/* Moral-Merry/public/css/fees.css */

:root {
    --primary: #4361ee;
    --secondary: #3a0ca3;
    --accent: #f72585;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #28a745;
    --danger: #dc3545;
    --light-gray: #f1f3f5;
    --gray: #ced4da;
    --dark-gray: #6c757d;
}

/* General Styles */
body {
    background-color: var(--light-gray);
}

.fees-container {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0;
    background-color: transparent;
    border-radius: 12px;
    box-shadow: none;
}

.fees-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.fees-header h1 {
    font-size: 2.8rem;
    color: var(--dark);
    font-weight: 700;
}

.fees-header p {
    font-size: 1.2rem;
    color: var(--dark-gray);
    max-width: 600px;
    margin: 0.5rem auto 0;
}

/* Form Styles */
.fee-form {
    background-color: #ffffff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    margin-bottom: 3rem;
    border: 1px solid var(--gray);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* Make the first 3 items span the full width if there are 5 items, for better balance */
    .form-grid .form-group:nth-child(1),
    .form-grid .form-group:nth-child(2),
    .form-grid .form-group:nth-child(3) {
        grid-column: span 1;
    }
    
    .form-grid .form-group:nth-child(1) { grid-column: 1 / -1; }
    .form-grid .form-group:nth-child(2) { grid-column: 1 / 2; }
    .form-grid .form-group:nth-child(3) { grid-column: 2 / 3; }
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.form-group input {
    padding: 0.8rem 1rem;
    border: 1px solid var(--gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.lookup-btn {
    display: block;
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lookup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.3);
}

/* Receipt Styles */
.receipt-container {
    margin-top: 3rem;
    border: none;
    border-radius: 12px;
    background-color: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden; /* To keep children within the border radius */
}

.receipt-header {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    padding: 2rem;
    text-align: center;
    border-bottom: none;
}

.receipt-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
}

.receipt-body {
    padding: 2.5rem;
}

.receipt-body .receipt-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--light-gray);
    font-size: 1.1rem;
}
.receipt-item strong {
    color: var(--dark-gray);
}
.receipt-item span {
    font-weight: 500;
    color: var(--dark);
}

.receipt-body .receipt-item:last-child {
    border-bottom: none;
}

.qr-code-section {
    text-align: center;
    padding: 2rem;
    background-color: var(--light-gray);
}

.qr-code-section p {
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

.qr-code-section img {
    max-width: 180px;
    margin-top: 1rem;
    border: 6px solid white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.receipt-footer {
    padding: 1.5rem 2.5rem;
    text-align: right;
    background-color: #ffffff;
}

.print-btn {
    padding: 0.8rem 1.8rem;
    background-color: var(--success);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.print-btn:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

.error-box {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    text-align: center;
}

/* Print-specific styles */
@media print {
  body, html {
    background-color: #fff;
  }
  
  .fees-container {
    margin: 0;
    padding: 0;
    box-shadow: none;
  }

  .no-print, .fees-header, .fee-form, .color-gradient-bg, header, footer {
    display: none !important;
  }

  .receipt-container {
    display: block !important;
    border: 1px solid #ccc;
    box-shadow: none;
    border-radius: 0;
    margin-top: 0;
    padding: 0;
  }

  .receipt-header {
      background: #eee !important;
      color: #000 !important;
      -webkit-print-color-adjust: exact;
      padding: 1rem;
  }
  .receipt-body {
      padding: 1rem;
  }

  body {
    font-size: 14px;
    color: #000;
  }
}