/**
 * Texas Elevator Association - Member Portal Stylesheet
 * Styles for member authentication and account management
 */

/* Base Styles */
body {
    font-family: 'Lato', sans-serif;
    margin: 0;
    padding: 0;
    background-image: url('../images/background-full.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #2c3e50;
    min-height: 100vh;
}

/* Dashboard Layout */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: rgba(44, 62, 80, 0.95);
    color: white;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
}

.sidebar-header {
    text-align: center;
    padding: 0 1rem;
    margin-bottom: 3rem;
}

.sidebar-logo {
    max-width: 120px;
}

.sidebar-nav a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    text-transform: uppercase;
    transition: background-color 0.3s, padding-left 0.3s;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
    background-color: #c0392b;
    
}

.sidebar-footer {
    margin-top: auto;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    padding: 2rem 3rem;
    overflow-y: auto;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.content-header h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    color: #2c3e50;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* Menu Toggle */
.menu-toggle {
    display: none;
    background: #c0392b;
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 0.5rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 1001;
}

/* Centered Layout (Login, Signup) */
body.centered {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Auth Container (Login/Signup) */
.auth-container {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 2rem 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.auth-container .logo {
    max-width: 180px;
    margin-bottom: 1.5rem;
}

.auth-container h2 {
    font-family: 'Oswald', sans-serif;
    margin-bottom: 2rem;
    color: #2c3e50;
}

/* Checkout Page Styles */
.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
}

.back-link {
    display: inline-block;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 700;
    margin-bottom: 1.5rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: #c0392b;
}

.checkout-card {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.checkout-card .logo {
    max-width: 150px;
    display: block;
    margin: 0 auto 2rem;
}

.checkout-card h1 {
    font-family: 'Oswald', sans-serif;
    text-align: center;
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.order-summary {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.order-summary h2 {
    font-family: 'Oswald', sans-serif;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #dee2e6;
}

.summary-row:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.2rem;
    color: #c0392b;
}

.payment-section {
    margin-top: 2rem;
}

.payment-section h2 {
    font-family: 'Oswald', sans-serif;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.payment-section p {
    margin-bottom: 1.5rem;
    color: #6c757d;
}

#card-element {
    background-color: white;
    padding: 1rem;
    border: 2px solid #dee2e6;
    border-radius: 5px;
    margin-bottom: 1rem;
}

#card-errors {
    color: #dc3545;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.pay-button {
    width: 100%;
    background-color: #c0392b;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.pay-button:hover {
    background-color: #a53125;
}

.pay-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.loading {
    text-align: center;
    color: #6c757d;
    margin: 1rem 0;
    font-style: italic;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 2px solid #dc3545;
    font-weight: 500;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 2px solid #28a745;
    font-weight: 500;
}

/* Account Container */
.account-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 2rem;
}

.account-header {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
}

.account-header .logo {
    max-width: 150px;
    margin-bottom: 1rem;
}

.account-header h1 {
    font-family: 'Oswald', sans-serif;
    color: #2c3e50;
    margin: 0.5rem 0;
}

.account-header .member-email {
    color: #666;
    font-size: 0.95rem;
}

.logout-btn {
    display: inline-block;
    margin-top: 1rem;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.logout-btn:hover {
    background-color: #5a6268;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1rem;
    font-family: 'Lato', sans-serif;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.btn {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #c0392b;
    color: white;
    font-size: 1.2rem;
}

.btn-primary:hover {
    background-color: #a53125;
}

.btn-secondary {
    background-color: #2c3e50;
    color: white;
    font-size: 1rem;
}

.btn-secondary:hover {
    background-color: #1a252f;
}

.btn-success {
    background-color: #28a745;
    color: white;
    font-size: 1.1rem;
}

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

/* Messages */
.message {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    text-align: center;
}

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

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

.warning-message {
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
}

.info-message {
    color: #004085;
    background-color: #cce5ff;
    border: 1px solid #b8daff;
}

/* Links */
.auth-link {
    margin-top: 1.5rem;
    font-size: 0.95rem;
}

.auth-link a {
    color: #c0392b;
    text-decoration: none;
    font-weight: 700;
}

.auth-link a:hover {
    text-decoration: underline;
}

.home-link {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.home-link a {
    color: #2c3e50;
    text-decoration: none;
}

.home-link a:hover {
    text-decoration: underline;
}

/* Cards */
.card {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card h2 {
    font-family: 'Oswald', sans-serif;
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #c0392b;
    padding-bottom: 0.5rem;
}

.card h3 {
    font-family: 'Oswald', sans-serif;
    color: #2c3e50;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
}

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

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

/* Membership Status Card */
.membership-status-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.status-heading {
    font-family: 'Oswald', sans-serif;
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.status-badge-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.status-active-large {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 3px solid #28a745;
    color: #155724;
}

.status-inactive-large {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 3px solid #dc3545;
    color: #721c24;
}

.status-icon {
    font-size: 2rem;
}

.status-text {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-details {
    margin-bottom: 2rem;
}

.status-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.status-detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-family: 'Oswald', sans-serif;
    color: #6c757d;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.detail-value {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.inactive-message {
    text-align: center;
    color: #6c757d;
    line-height: 1.6;
    font-size: 1rem;
}

.btn-full-width {
    text-align: center;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 4px;
}

/* Tables */
.members-table,
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background-color: white;
}

.members-table tbody,
.data-table tbody {
    background-color: white;
}

.members-table th,
.members-table td,
.data-table th,
.data-table td {
    padding: 0.6rem 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
    background-color: white;
}

.members-table th,
.data-table th {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    background-color: #f2f2f2;
    font-size: 0.9rem;
}

.members-table tr:hover,
.data-table tr:hover {
    background-color: #f9f9f9;
}

.data-table .no-data {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* Pricing Plans Grid */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.plan-card {
    background-color: rgba(255, 255, 255, 0.95);
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-color: #c0392b;
}

.plan-card.current-plan {
    border: 3px solid #28a745;
    background-color: rgba(212, 237, 218, 0.3);
}

.plan-card.current-plan:hover {
    border-color: #28a745;
}

.current-plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 0.4rem 1.5rem;
    border-radius: 20px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
}

.plan-card h3 {
    font-family: 'Oswald', sans-serif;
    color: #2c3e50;
    font-size: 1.8rem;
    margin-top: 0;
}

.plan-price {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    color: #c0392b;
    margin: 1rem 0;
}

.plan-price .currency {
    font-size: 1.5rem;
}

.plan-duration {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.plan-description {
    color: #2c3e50;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    min-height: 60px;
}

.choose-btn {
    display: inline-block;
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    color: white;
    padding: 1rem 2.5rem;
    text-decoration: none;
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(192, 57, 43, 0.3);
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
}

.choose-btn:hover {
    background: linear-gradient(135deg, #a53125 0%, #c0392b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(192, 57, 43, 0.4);
}

.choose-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(192, 57, 43, 0.3);
}

.choose-btn.disabled {
    background: linear-gradient(135deg, #6c757d 0%, #95a5a6 100%);
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}

.choose-btn.disabled:hover {
    background: linear-gradient(135deg, #6c757d 0%, #95a5a6 100%);
    transform: none;
    box-shadow: none;
}

.plan-name {
    font-family: 'Oswald', sans-serif;
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

/* Stripe Elements */
#card-element {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
}

#card-errors {
    color: #c0392b;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #c0392b;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        height: 100vh;
        top: 0;
        left: 0;
        transform: translateX(-100%);
        overflow-y: auto;
        padding: 1rem 0;
        box-sizing: border-box;
    }

    .sidebar.visible {
        transform: translateX(0);
    }

    .sidebar-header {
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;
    }

    .sidebar-logo {
        max-width: 100px;
    }

    .sidebar-nav a {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .main-content {
        padding: 2rem;
    }

    .menu-toggle {
        display: block;
    }

    .content-header {
        padding-top: 4rem;
    }
}

@media (max-width: 768px) {
    .auth-container {
        padding: 1.5rem 2rem;
        max-width: 90%;
    }

    .account-container {
        padding: 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .plans-grid {
        grid-template-columns: 1fr;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .content-header h1 {
        font-size: 2rem;
    }

    .table-container {
        padding: 1rem;
        overflow-x: auto;
    }

    /* Responsive table styles */
    .data-table,
    .members-table {
        display: block;
        width: 100%;
    }

    .data-table thead,
    .members-table thead {
        display: none;
    }

    .data-table tbody,
    .members-table tbody {
        display: block;
    }

    .data-table tr,
    .members-table tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 1rem;
        background-color: white;
    }

    .data-table td,
    .members-table td {
        display: flex;
        justify-content: space-between;
        padding: 0.5rem 0;
        border-bottom: 1px solid #f0f0f0;
        text-align: right;
    }

    .data-table td:last-child,
    .members-table td:last-child {
        border-bottom: none;
    }

    .data-table td::before,
    .members-table td::before {
        content: attr(data-label);
        font-weight: bold;
        text-align: left;
        color: #2c3e50;
        font-family: 'Oswald', sans-serif;
        text-transform: uppercase;
        font-size: 0.85rem;
    }

    /* Pagination responsive */
    .pagination {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .pagination a {
        margin: 0;
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}
