/* College Fee Manager - Public Styles */

.cfm-payment-form-wrapper {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cfm-payment-form-wrapper h2 {
    margin: 0 0 10px 0;
    color: #333;
}

.cfm-academic-year {
    background: #e7f3ff;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    color: #0056b3;
}

.cfm-form-group {
    margin-bottom: 20px;
}

.cfm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.cfm-form-group input[type="text"],
.cfm-form-group input[type="email"],
.cfm-form-group input[type="tel"],
.cfm-form-group input[type="date"],
.cfm-form-group input[type="number"],
.cfm-form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.cfm-form-group input:focus,
.cfm-form-group select:focus {
    outline: none;
    border-color: #0071a1;
    box-shadow: 0 0 0 1px #0071a1;
}

.cfm-fee-display {
    margin-top: 10px;
    padding: 10px;
    background: #f0f9ff;
    border-left: 4px solid #0071a1;
    font-weight: bold;
}

.cfm-help-text {
    margin-top: 5px;
    font-size: 14px;
    color: #666;
}

.cfm-submit-button {
    width: 100%;
    padding: 15px;
    background: #0071a1;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.cfm-submit-button:hover {
    background: #005a87;
}

.cfm-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.cfm-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
}

.cfm-message.success {
    background: #d1f4e0;
    color: #00662e;
    border: 1px solid #00a648;
}

.cfm-message.error {
    background: #ffe4e4;
    color: #a00;
    border: 1px solid #d63638;
}

.cfm-error {
    color: #d63638;
    padding: 15px;
    background: #ffe4e4;
    border-radius: 4px;
}

/* Fee Structure Table */
.cfm-fee-structure {
    margin: 20px 0;
}

.cfm-fee-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.cfm-fee-table th,
.cfm-fee-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.cfm-fee-table th {
    background: #f5f5f5;
    font-weight: bold;
}

.cfm-fee-table tr:hover {
    background: #f9f9f9;
}

input.error,
select.error {
    border-color: #d63638 !important;
    box-shadow: 0 0 0 1px #d63638 !important;
}

/* ========================================
   MOBILE RESPONSIVENESS
   ======================================== */

/* Tablets and below (768px) */
@media screen and (max-width: 768px) {
    .cfm-payment-form-wrapper {
        max-width: 100%;
        margin: 20px auto;
        padding: 20px;
        border-radius: 6px;
    }
    
    .cfm-payment-form-wrapper h2 {
        font-size: 22px;
    }
    
    .cfm-form-group {
        margin-bottom: 18px;
    }
    
    .cfm-form-group input[type="text"],
    .cfm-form-group input[type="email"],
    .cfm-form-group input[type="tel"],
    .cfm-form-group input[type="date"],
    .cfm-form-group input[type="number"],
    .cfm-form-group select {
        padding: 10px;
        font-size: 15px;
    }
    
    .cfm-submit-button {
        padding: 13px;
        font-size: 16px;
    }
    
    .cfm-fee-table {
        font-size: 14px;
    }
    
    .cfm-fee-table th,
    .cfm-fee-table td {
        padding: 10px 8px;
    }
}

/* Mobile devices (480px and below) */
@media screen and (max-width: 480px) {
    .cfm-payment-form-wrapper {
        margin: 10px;
        padding: 15px;
        border-radius: 4px;
        box-shadow: 0 1px 5px rgba(0,0,0,0.1);
    }
    
    .cfm-payment-form-wrapper h2 {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .cfm-academic-year {
        padding: 8px;
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .cfm-form-group {
        margin-bottom: 15px;
    }
    
    .cfm-form-group label {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .cfm-form-group input[type="text"],
    .cfm-form-group input[type="email"],
    .cfm-form-group input[type="tel"],
    .cfm-form-group input[type="date"],
    .cfm-form-group input[type="number"],
    .cfm-form-group select {
        padding: 10px 8px;
        font-size: 14px;
    }
    
    .cfm-fee-display {
        padding: 8px;
        font-size: 14px;
    }
    
    .cfm-help-text {
        font-size: 12px;
    }
    
    .cfm-submit-button {
        padding: 12px;
        font-size: 15px;
    }
    
    .cfm-message {
        margin-top: 15px;
        padding: 12px;
        font-size: 14px;
    }
    
    /* Make fee table responsive */
    .cfm-fee-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 13px;
    }
    
    .cfm-fee-table thead {
        display: none;
    }
    
    .cfm-fee-table,
    .cfm-fee-table tbody,
    .cfm-fee-table tr,
    .cfm-fee-table td {
        display: block;
        width: 100%;
    }
    
    .cfm-fee-table tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 4px;
        padding: 10px;
        background: #fff;
    }
    
    .cfm-fee-table td {
        text-align: left;
        padding: 5px 0;
        border: none;
    }
    
    .cfm-fee-table td::before {
        content: attr(data-label);
        font-weight: bold;
        display: inline-block;
        width: 140px;
        color: #666;
    }
    
    .cfm-fee-structure h3 {
        font-size: 16px;
    }
}

/* Very small devices (360px and below) */
@media screen and (max-width: 360px) {
    .cfm-payment-form-wrapper {
        margin: 5px;
        padding: 12px;
    }
    
    .cfm-payment-form-wrapper h2 {
        font-size: 16px;
    }
    
    .cfm-form-group label {
        font-size: 13px;
    }
    
    .cfm-form-group input[type="text"],
    .cfm-form-group input[type="email"],
    .cfm-form-group input[type="tel"],
    .cfm-form-group input[type="date"],
    .cfm-form-group input[type="number"],
    .cfm-form-group select {
        padding: 8px;
        font-size: 13px;
    }
    
    .cfm-submit-button {
        padding: 10px;
        font-size: 14px;
    }
    
    .cfm-fee-table {
        font-size: 12px;
    }
    
    .cfm-fee-table td::before {
        width: 120px;
        font-size: 12px;
    }
}

/* Landscape mode for small devices */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .cfm-payment-form-wrapper {
        margin: 10px auto;
        padding: 15px;
    }
    
    .cfm-form-group {
        margin-bottom: 12px;
    }
    
    .cfm-form-group input[type="text"],
    .cfm-form-group input[type="email"],
    .cfm-form-group input[type="tel"],
    .cfm-form-group input[type="date"],
    .cfm-form-group input[type="number"],
    .cfm-form-group select {
        padding: 8px;
    }
}

