/* ============================================================
   USER SUBSCRIPTION VIEWS - MODERN RESPONSIVE CSS
   Prefix: usv- (User Subscription View)
   ============================================================ */

/* === GLOBAL CONTAINER === */
.usv-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.usv-center {
    text-align: center;
}

/* === PAGE TITLES === */
.usv-page-title {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.usv-page-subtitle {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 32px;
    line-height: 1.6;
}

/* === ALERT MESSAGES === */
.usv-alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-weight: 500;
    line-height: 1.6;
}

.usv-alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.usv-alert-danger,
.usv-alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.usv-alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

.usv-alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

/* === CARDS GRID === */
.usv-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.usv-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.usv-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
}

.usv-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.usv-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.usv-card-description {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* === BUTTONS === */
.usv-btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.usv-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff !important;
}

.usv-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.usv-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff !important;
}

.usv-btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.usv-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff !important;
}

.usv-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.usv-btn-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: #fff !important;
}

.usv-btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    transform: translateY(-2px);
}

.usv-btn-back {
    display: inline-block;
    padding: 10px 24px;
    background: #f3f4f6;
    color: #374151 !important;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    margin-bottom: 24px;
}

.usv-btn-back:hover {
    background: #e5e7eb;
    transform: translateX(-4px);
}

/* === FORM CONTAINER === */
.usv-form-container {
    background: #fff;
    border-radius: 16px;
    padding: 40px 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-width: 700px;
    margin: 0 auto;
}

.usv-form-group {
    margin-bottom: 24px;
    text-align: left;
}

.usv-form-label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.usv-form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    color: #1f2937;
    background: #fff;
    transition: all 0.3s ease;
}

.usv-form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.usv-form-control[readonly] {
    background: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

/* === TABLE STYLING === */
.usv-table-container {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
    margin-bottom: 24px;
}

.usv-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.usv-table thead {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.usv-table th {
    padding: 16px;
    text-align: left;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.usv-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s ease;
}

.usv-table tbody tr:hover {
    background: #f9fafb;
}

.usv-table td {
    padding: 16px;
    color: #1f2937;
    font-size: 14px;
}

.usv-table td a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.usv-table td a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* === STATUS BADGES === */
.usv-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.usv-badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.usv-badge-active {
    background: #d1fae5;
    color: #065f46;
}

.usv-badge-expired {
    background: #fee2e2;
    color: #991b1b;
}

.usv-badge-cancelled {
    background: #e5e7eb;
    color: #374151;
}

/* === INFO BOX === */
.usv-info-box {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    line-height: 1.6;
}

.usv-info-box p {
    color: #1e40af;
    margin: 0;
}

.usv-info-box strong {
    font-weight: 700;
}

/* === FILTER TOGGLE === */
.usv-filter-toggle {
    display: inline-block;
    padding: 10px 20px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 16px;
}

.usv-filter-toggle:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

/* === FILTER FORM === */
.usv-filter-form {
    background: #f9fafb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    display: none;
}

.usv-filter-form.show {
    display: block;
}

.usv-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.usv-filter-group {
    flex: 1;
    min-width: 200px;
}

.usv-filter-group label {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-weight: 600;
    font-size: 13px;
}

.usv-filter-group input,
.usv-filter-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
}

/* === PAGINATION === */
.usv-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.usv-pagination a,
.usv-pagination span {
    padding: 10px 16px;
    background: #fff;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.usv-pagination a:hover {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.usv-pagination .active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

/* === PAYMENT SUCCESS/FAILURE === */
.usv-status-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.usv-status-icon.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.usv-status-icon.failure {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

/* === SECURITY NOTICE === */
.usv-security-notice {
    background: #d1fae5;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    text-align: center;
}

.usv-security-notice h4 {
    color: #065f46;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .usv-container {
        padding: 12px;
    }

    .usv-page-title {
        font-size: 24px;
    }

    .usv-cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .usv-card {
        padding: 24px 20px;
    }

    .usv-form-container {
        padding: 28px 20px;
    }

    .usv-btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    .usv-table-container {
        padding: 16px;
    }

    .usv-filter-row {
        flex-direction: column;
    }

    .usv-filter-group {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .usv-page-title {
        font-size: 20px;
    }

    .usv-card-title {
        font-size: 16px;
    }

    .usv-btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .usv-table th,
    .usv-table td {
        padding: 12px 8px;
        font-size: 12px;
    }
}

/* === UTILITY CLASSES === */
.usv-mt-1 { margin-top: 0.5rem; }
.usv-mt-2 { margin-top: 1rem; }
.usv-mt-3 { margin-top: 1.5rem; }
.usv-mt-4 { margin-top: 2rem; }

.usv-mb-1 { margin-bottom: 0.5rem; }
.usv-mb-2 { margin-bottom: 1rem; }
.usv-mb-3 { margin-bottom: 1.5rem; }
.usv-mb-4 { margin-bottom: 2rem; }

.usv-text-center { text-align: center; }
.usv-text-left { text-align: left; }
.usv-text-right { text-align: right; }



/* === FIX: Prevent Form Inputs from Overflowing the Container === */
.usv-form-container {
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden; /* prevent any horizontal scroll or overflow */
}

/* Ensure form groups don’t exceed the form width */
.usv-form-group {
    width: 100%;
    box-sizing: border-box;
}

/* Ensure inputs and selects stay inside container and are properly spaced */
.usv-form-control {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}




/* Add updated october 28 2025 for subscription user index page note buttons */

.usv-alert-toggle-group {
    display: flex;
    justify-content: center; /* ✅ Centers the buttons horizontally */
    align-items: center;     /* optional: vertically aligns buttons if they vary in height */
    gap: 10px;
    margin-bottom: 12px;
}


.usv-alert-toggle {
    background-color: #2563eb;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.2s ease;
}

.usv-alert-toggle:hover {
    background-color: #1e40af;
}

.usv-alert-toggle.active {
    background-color: #1e3a8a;
}

.usv-alert-collapsed {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    padding: 0 10px;
}

.usv-alert-expanded {
    max-height: 500px;
    transition: max-height 0.4s ease-in, padding 0.4s ease-in;
    padding: 10px;
}


.usv-read-hint {
    text-align: center;
    color: #f97316; /* orange-500 */
    font-size: 13px;
    margin-top: 6px;
    opacity: 1;
    transition: opacity 1s ease-out;
}
.usv-read-hint.hidden {
    opacity: 0;
}


/* Add updated october 28 2025 for subscription user index page note buttons */
