/**
 * Responsive Fixes for Tax360 Application
 * This file contains responsive design fixes for various pages
 */

/* Toast notifications */
.toast-container {
  z-index: 9999;
}

/* General responsive fixes */
@media (max-width: 768px) {
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .card {
    margin-bottom: 1rem;
  }
  
  .table-responsive {
    margin-bottom: 1rem;
  }
  
  .btn {
    white-space: nowrap;
  }
}

/* Small screens and mobile devices */
@media (max-width: 576px) {
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  
  h1, .h1 {
    font-size: 1.75rem;
  }
  
  h2, .h2 {
    font-size: 1.5rem;
  }
  
  h3, .h3 {
    font-size: 1.25rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .modal-body {
    padding: 1rem;
  }
  
  .btn {
    padding: 0.375rem 0.75rem;
  }
  
  .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
  
  /* Toast container positioning for mobile */
  .toast-container {
    bottom: 10px !important;
    right: 10px !important;
    left: 10px !important;
    width: auto !important;
  }
  
  /* Form controls */
  .form-control {
    font-size: 0.9rem;
  }
  
  /* Tables */
  .table th, .table td {
    padding: 0.5rem;
    font-size: 0.85rem;
  }
}

/* Assets & Liabilities specific fixes */
.file-card {
  transition: all 0.3s ease;
}

.file-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.file-info h6 {
  word-break: break-word;
  overflow-wrap: break-word;
}

@media (max-width: 576px) {
  .file-card {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .file-actions {
    justify-content: center;
  }
  
  .file-icon {
    margin: 0 auto;
  }
}

/* Fix for file download buttons */
.action-btn.download {
  position: relative;
}

.action-btn.download.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn.download.loading::before {
  content: '';
  width: 12px;
  height: 12px;
  border: 2px solid #ccc;
  border-top-color: #27ae60;
  border-radius: 50%;
  position: absolute;
  top: calc(50% - 6px);
  left: calc(50% - 6px);
  animation: spin 1s linear infinite;
  z-index: 1;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}