/**
 * Thawani Partial Payment Styles
 *
 * @package ThawaniPaymentWoo
 */

/* ============================================
   Checkout Page Styles
   ============================================ */

.thawani-partial-payment-options {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: 2px solid #0066cc;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.thawani-partial-payment-options h3 {
    margin: 0 0 15px 0;
    color: #0066cc;
    font-size: 18px;
    font-weight: 600;
}

/* Payment Type Selector */
.payment-type-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.payment-type-selector label {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-type-selector label:hover {
    border-color: #0066cc;
    background: #f0f8ff;
}

.payment-type-selector input[type="radio"] {
    margin: 0 10px 0 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.payment-type-selector input[type="radio"]:checked + span {
    font-weight: 600;
    color: #0066cc;
}

.payment-type-selector label:has(input:checked) {
    border-color: #0066cc;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.2);
}

/* Deposit Options */
.deposit-options,
.installment-options {
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.deposit-options label,
.installment-options label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.deposit-options select,
.installment-options select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.deposit-options select:focus,
.installment-options select:focus {
    outline: none;
    border-color: #0066cc;
}

/* Payment Breakdown */
.payment-breakdown {
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
}

.payment-breakdown h4 {
    margin: 0 0 15px 0;
    color: #0066cc;
    font-size: 16px;
    font-weight: 600;
}

.breakdown-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 15px;
}

.breakdown-table tr {
    border-bottom: 1px solid #eee;
}

.breakdown-table tr:last-child {
    border-bottom: none;
}

.breakdown-table th,
.breakdown-table td {
    padding: 10px;
    text-align: left;
}

.breakdown-table th {
    font-weight: 600;
    color: #555;
    width: 60%;
}

.breakdown-table td {
    text-align: right;
    font-weight: 600;
    color: #333;
}

.breakdown-table td.highlight {
    color: #0066cc;
    font-size: 18px;
}

/* Installment Schedule */
.installment-schedule {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.installment-schedule thead {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: #fff;
}

.installment-schedule th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.installment-schedule tbody tr {
    border-bottom: 1px solid #eee;
}

.installment-schedule tbody tr:last-child {
    border-bottom: none;
}

.installment-schedule tbody tr:nth-child(even) {
    background: #f9f9f9;
}

.installment-schedule tbody tr:hover {
    background: #f0f8ff;
}

.installment-schedule td {
    padding: 10px 12px;
}

/* Payment Note */
.payment-note {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    background: #e3f2fd;
    border-left: 4px solid #0066cc;
    border-radius: 4px;
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

.payment-note .dashicons {
    margin-right: 8px;
    color: #0066cc;
    flex-shrink: 0;
}

.payment-note strong {
    color: #0066cc;
}

/* ============================================
   My Account Page Styles
   ============================================ */

.thawani-payment-status {
    background: #fff;
    border: 2px solid #0066cc;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.thawani-payment-status h2 {
    margin: 0 0 20px 0;
    color: #0066cc;
    font-size: 20px;
    font-weight: 600;
}

/* Progress Bar */
.payment-progress {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50 0%, #66bb6a 100%);
    border-radius: 15px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
}

.progress-fill span {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Payment Summary */
.payment-summary {
    margin-bottom: 20px;
}

.payment-summary .shop_table {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.payment-summary .shop_table tr {
    border-bottom: 1px solid #eee;
}

.payment-summary .shop_table tr:last-child {
    border-bottom: none;
}

.payment-summary .shop_table th,
.payment-summary .shop_table td {
    padding: 12px;
}

.payment-summary .shop_table th {
    font-weight: 600;
    color: #555;
    width: 50%;
}

.payment-summary .shop_table td {
    text-align: right;
    font-weight: 600;
}

.payment-summary .shop_table tr.remaining-row {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.payment-summary .shop_table tr.remaining-row th,
.payment-summary .shop_table tr.remaining-row td {
    color: #2e7d32;
    font-size: 16px;
}

/* Payment Schedule */
.payment-schedule {
    margin-top: 20px;
}

.payment-schedule h3 {
    margin: 0 0 15px 0;
    color: #0066cc;
    font-size: 18px;
    font-weight: 600;
}

.payment-schedule .shop_table {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.payment-schedule .shop_table thead {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: #fff;
}

.payment-schedule .shop_table th {
    padding: 12px;
    font-weight: 600;
}

.payment-schedule .shop_table tbody tr {
    border-bottom: 1px solid #eee;
}

.payment-schedule .shop_table tbody tr:last-child {
    border-bottom: none;
}

.payment-schedule .shop_table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

.payment-schedule .shop_table td {
    padding: 12px;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.paid {
    background: #4caf50;
    color: #fff;
}

.status-badge.pending {
    background: #ff9800;
    color: #fff;
}

.status-badge.failed {
    background: #f44336;
    color: #fff;
}

.status-badge.overdue {
    background: #d32f2f;
    color: #fff;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Pay Button */
.pay-button {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: #fff !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pay-button:hover {
    background: linear-gradient(135deg, #0052a3 0%, #003d7a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.3);
}

.paid-checkmark {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: #4caf50;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-weight: 600;
}

/* ============================================
   Responsive Styles
   ============================================ */

@media screen and (max-width: 768px) {
    .thawani-partial-payment-options {
        padding: 15px;
    }
    
    .payment-type-selector {
        gap: 10px;
    }
    
    .payment-type-selector label {
        padding: 10px;
    }
    
    .breakdown-table th,
    .breakdown-table td {
        padding: 8px;
        font-size: 14px;
    }
    
    .breakdown-table td.highlight {
        font-size: 16px;
    }
    
    .installment-schedule {
        font-size: 14px;
    }
    
    .installment-schedule th,
    .installment-schedule td {
        padding: 8px;
    }
    
    .payment-note {
        font-size: 13px;
    }
    
    .thawani-payment-status {
        padding: 15px;
    }
    
    .progress-bar {
        height: 25px;
    }
    
    .progress-fill span {
        font-size: 12px;
    }
    
    .payment-schedule .shop_table_responsive thead {
        display: none;
    }
    
    .payment-schedule .shop_table_responsive tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 6px;
        overflow: hidden;
    }
    
    .payment-schedule .shop_table_responsive td {
        display: flex;
        justify-content: space-between;
        padding: 10px;
        border-bottom: 1px solid #eee;
    }
    
    .payment-schedule .shop_table_responsive td:last-child {
        border-bottom: none;
    }
    
    .payment-schedule .shop_table_responsive td::before {
        content: attr(data-title);
        font-weight: 600;
        color: #555;
    }
}

@media screen and (max-width: 480px) {
    .thawani-partial-payment-options h3 {
        font-size: 16px;
    }
    
    .payment-breakdown h4 {
        font-size: 14px;
    }
    
    .thawani-payment-status h2 {
        font-size: 18px;
    }
    
    .payment-schedule h3 {
        font-size: 16px;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .thawani-partial-payment-options,
    .thawani-payment-status,
    .payment-schedule {
        border: 1px solid #000;
        page-break-inside: avoid;
    }
    
    .pay-button {
        display: none;
    }
    
    .progress-bar {
        border: 1px solid #000;
    }
    
    .progress-fill {
        background: #ccc !important;
    }
}