/* ============================================================
   Subscription Pages - Styles
   Matches the existing Tint Tek 20/20 site aesthetic
   ============================================================ */

/* --- Layout --- */
.sub-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.sub-card {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 44, 91, 0.08);
}

.sub-card h2,
.sub-card h3 {
    color: #003f68;
    margin-bottom: 15px;
}

.sub-card hr {
    border: none;
    border-top: 2px solid #e8e8e8;
    margin: 20px 0;
}

/* --- Form Styles --- */
.sub-form label {
    display: block;
    margin-bottom: 4px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.sub-form input[type="text"],
.sub-form input[type="email"],
.sub-form input[type="tel"],
.sub-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}

.sub-form input[type="text"]:focus,
.sub-form input[type="email"]:focus,
.sub-form input[type="tel"]:focus,
.sub-form select:focus {
    border-color: #003f68;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 63, 104, 0.15);
}

.sub-form .form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.sub-form .form-row .form-col {
    flex: 1;
    min-width: 200px;
}

.sub-form .form-row .form-col-full {
    flex: 0 0 100%;
}

.sub-form .error-text {
    color: #cc0000;
    font-size: 12px;
    margin-top: -8px;
    margin-bottom: 8px;
}

/* --- Plan Selection --- */
.plan-selector {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.plan-option {
    flex: 1;
    min-width: 250px;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.plan-option:hover {
    border-color: #003f68;
    background: #f8fbff;
}

.plan-option.selected {
    border-color: #003f68;
    background: #eef4fa;
    box-shadow: 0 0 0 2px rgba(0, 63, 104, 0.2);
}

.plan-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.plan-option .plan-name {
    font-size: 20px;
    font-weight: bold;
    color: #003f68;
    margin-bottom: 8px;
}

.plan-option .plan-price {
    font-size: 32px;
    font-weight: bold;
    color: #004b7b;
    margin-bottom: 4px;
}

.plan-option .plan-period {
    font-size: 14px;
    color: #666;
}

.plan-option .plan-breakdown {
    font-size: 12px;
    color: #666;
    margin-top: 6px;
}

.plan-option .plan-first-month {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

.plan-option .plan-renewal {
    font-size: 14px;
    font-weight: 600;
    color: #004b7b;
    margin-top: 4px;
}

.plan-option .plan-savings {
    display: inline-block;
    background: #28a745;
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin-top: 8px;
}

/* --- Buttons --- */
.sub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 16px;
    line-height: 1.2;
    font-weight: bold;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    text-align: center;
    box-sizing: border-box;
    vertical-align: middle;
}

.sub-btn-primary,
a.sub-btn-primary,
.wrapper.style1 a.sub-btn-primary {
    background: #003f68;
    border-color: #003f68;
    color: #ffffff !important;
}

.sub-btn-primary:hover,
a.sub-btn-primary:hover,
.wrapper.style1 a.sub-btn-primary:hover {
    background: #004b7b;
    border-color: #004b7b;
    color: #ffffff !important;
}

.sub-btn-danger {
    background: #dc3545;
    border-color: #dc3545;
    color: #ffffff;
}

.sub-btn-danger:hover {
    background: #c82333;
    border-color: #c82333;
}

.sub-btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
    color: #ffffff;
}

.sub-btn-secondary:hover {
    background: #5a6268;
    border-color: #5a6268;
}

.sub-btn-success {
    background: #28a745;
    border-color: #28a745;
    color: #ffffff;
}

.sub-btn-success:hover {
    background: #218838;
    border-color: #218838;
}

.sub-btn-outline {
    background: transparent;
    color: #003f68;
    border-color: #003f68;
}

.sub-btn-outline:hover {
    background: #003f68;
    color: #ffffff;
}

.sub-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sub-btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
    justify-content: center;
    align-items: center;
}

/* --- Status Badge --- */
.sub-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
}

.sub-badge-active {
    background: #d4edda;
    color: #155724;
}

.sub-badge-paused {
    background: #fff3cd;
    color: #856404;
}

.sub-badge-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.sub-badge-expired {
    background: #e2e3e5;
    color: #383d41;
}

/* --- Subscription Details Grid --- */
.sub-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 16px 0;
}

.sub-detail-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.sub-detail-item .detail-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.sub-detail-item .detail-value {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

/* --- Payment History Table --- */
.sub-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.sub-table th {
    background: #003f68;
    color: #ffffff !important;
    padding: 10px 12px;
    text-align: left;
    font-size: 13px;
}

.sub-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.sub-table tr:hover td {
    background: #f8f9fa;
}

.sub-table .amount-cell {
    font-weight: bold;
}

.sub-table .status-y {
    color: #28a745;
    font-weight: bold;
}

.sub-table .status-n {
    color: #dc3545;
    font-weight: bold;
}

/* --- MCO Checkout Container --- */
#monerisCheckout {
    min-height: 400px;
    margin: 20px 0;
}

#mco-status {
    display: none;
    text-align: center;
    padding: 20px;
    font-size: 16px;
    color: #003f68;
    background: #eef4fa;
    border-radius: 6px;
    margin: 16px 0;
}

/* --- Success / Error Messages --- */
.sub-alert {
    padding: 16px 20px;
    border-radius: 6px;
    margin: 16px 0;
    font-size: 14px;
}

.sub-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.sub-alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.sub-alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.sub-alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* --- Confirmation Modal Overlay --- */
.sub-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.sub-modal-overlay.active {
    display: flex;
}

.sub-modal {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.sub-modal h3 {
    margin-bottom: 12px;
    color: #333;
}

.sub-modal p {
    margin-bottom: 20px;
    color: #555;
}

/* --- Responsive --- */
@media screen and (max-width: 640px) {
    .sub-form .form-row {
        flex-direction: column;
        gap: 0;
    }

    .plan-selector {
        flex-direction: column;
    }

    .sub-details-grid {
        grid-template-columns: 1fr;
    }

    .sub-btn-group {
        flex-direction: column;
    }

    .sub-btn {
        width: 100%;
    }
}
