/* ============================================
   EVERYDAY IT SERVICES - CLIENT PORTAL STYLES
   ============================================ */

/* ===== CSS VARIABLES ===== */
:root {
    --primary-color: #3498db;
    --primary-hover: #2980b9;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --muted-color: #7f8c8d;
    --border-color: #dee2e6;
    --bg-color: #f3f4f7;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
    --border-radius: 6px;
    --transition: all 0.3s ease;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

* {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    font-size: 16px;
}

body, html {
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    height: 100%;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    padding: 0;
    color: var(--secondary-color);
    font-weight: 600;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== LAYOUT ===== */
.wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.content {
    padding: 20px;
    min-height: calc(100vh - 140px);
}

/* ===== HEADER ===== */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logos {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logos img {
    height: 40px;
    width: auto;
}

/* ===== NAVIGATION & DROPDOWN FIX ===== */
nav.menu {
    display: flex;
    align-items: center;
    gap: 25px;
}

nav.menu a {
    color: var(--secondary-color);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

nav.menu a:hover,
nav.menu a.active {
    color: var(--primary-color);
}

nav.menu a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

/* Dropdown Menu - FIXED */
.dropdown {
    position: relative;
}

.dropdown-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.dropdown-btn:hover {
    background: var(--bg-color);
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 200px;
    box-shadow: var(--shadow-hover);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1001;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    display: block;
    padding: 12px 16px;
    color: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

/* Mobile Menu Toggle */
#menu {
    display: none;
}

label[for="menu"] {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    position: relative;
}

label[for="menu"]::before,
label[for="menu"]::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background: var(--secondary-color);
    transition: var(--transition);
}

label[for="menu"]::before {
    top: 8px;
    box-shadow: 0 8px 0 var(--secondary-color);
}

label[for="menu"]::after {
    top: 24px;
}

/* ===== FORMS ===== */
.form {
    display: flex;
    flex-flow: column;
    width: 100%;
}

.form-label {
    display: block;
    padding: 20px 0 10px 0;
    font-weight: 500;
    font-size: 14px;
    color: var(--secondary-color);
}

.form-group {
    display: flex;
    position: relative;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.form-input {
    width: 100%;
    height: 43px;
    border: 1px solid var(--border-color);
    padding: 0 15px;
    border-radius: var(--border-radius);
    outline: 0;
    color: var(--secondary-color);
    transition: var(--transition);
}

.form-input:focus {
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    border-color: var(--primary-color);
}

.form-link {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 14px;
}

/* ============= PAYMENT FORMS ============= */
.payment-form {
    margin-top: 20px;
}

.form-actions {
    margin-top: 25px;
}

/* ============= PAYMENT FORM SPECIFIC ============= */
.payment-method-option .badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-block {
    width: 100%;
}

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

.btn.blue {
    background: var(--primary-color);
    color: var(--white);
}

.btn.blue:hover:not(:disabled) {
    background: var(--primary-hover);
}

.btn.green {
    background: var(--success-color);
    color: var(--white);
}

.btn.green:hover:not(:disabled) {
    background: #229954;
}

.btn.red {
    background: var(--danger-color);
    color: var(--white);
}

.btn.red:hover:not(:disabled) {
    background: #c0392b;
}

/* ===== MESSAGES ===== */
.msg {
    padding: 12px 16px;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    margin: 15px 0;
}

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

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

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

/* ===== LOGIN PAGE ===== */
.login {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.login h1 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--secondary-color);
}

/* ===== PAGE TITLES ===== */
.page-title {
    display: flex;
    align-items: center;
    margin: 20px 0;
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.page-title .icon {
    margin-right: 15px;
    color: var(--primary-color);
}

.page-title h2 {
    font-size: 1.8rem;
}

.page-title p {
    font-size: 1rem;
    color: var(--muted-color);
    margin: 5px 0 0 0;
}

/* ===== BLOCKS/CARDS ===== */
.block {
    background: var(--white);
    padding: 20px;
    margin-bottom: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.block:hover {
    box-shadow: var(--shadow-hover);
}

.block h2 {
    margin-bottom: 15px;
    font-size: 1.4rem;
    color: var(--secondary-color);
}

/* ===== ACTION BLOCKS ===== */
.action-block {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.action-sub-block {
    flex: 1;
    min-width: 150px;
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 20px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.action-sub-block a {
    color: var(--white);
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.action-sub-block:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* ===== TICKETS ===== */
.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticket {
    display: flex;
    justify-content: space-between;
    background: var(--white);
    padding: 15px;
    border-radius: var(--border-radius);
    border-left: 5px solid var(--primary-color);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.ticket:hover {
    background: #f0f8ff;
    box-shadow: var(--shadow-hover);
}

.ticket .title {
    font-weight: 600;
    margin-bottom: 5px;
}

.ticket .priority {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--white);
    text-transform: uppercase;
}

.ticket .priority.low { background: var(--success-color); }
.ticket .priority.medium { background: var(--warning-color); }
.ticket .priority.high { background: var(--danger-color); }

.ticket .status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--white);
    text-transform: uppercase;
}

.ticket .status.open { background: var(--success-color); }
.ticket .status.resolved { background: var(--primary-color); }
.ticket .status.closed { background: var(--danger-color); }

/* ============= STRIPE ELEMENTS ============= */
.stripe-element-container {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 15px;
    min-height: 60px;
    background: white;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.stripe-element-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.stripe-element {
    width: 100%;
}

/* Stripe error messages */
.stripe-error {
    color: var(--danger-color);
    margin-top: 8px;
    font-size: 14px;
    display: none;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--secondary-color);
    color: var(--white);
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

.footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* Smooth modal animations */
@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal.active .modal-content {
    animation: modalFadeIn 0.3s ease-out;
}

/* Error banner positioning */
.error-banner {
    position: fixed;
    top: 80px; /* Below header */
    right: 20px;
    z-index: 9999;
    /* ... rest of banner styles ... */
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    /* Mobile Navigation */
    label[for="menu"] {
        display: block;
    }
    
    nav.menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        transition: left 0.3s;
        box-shadow: var(--shadow);
        overflow-y: auto;
    }
    
    #menu:checked + label[for="menu"] + nav.menu {
        left: 0;
    }
    
    nav.menu a {
        width: 100%;
        padding: 15px 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    /* Mobile Dropdown Fix */
    .dropdown {
        width: 100%;
    }
    
    .dropdown-content {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: var(--bg-color);
        display: none;
    }
    
    .dropdown.active .dropdown-content {
        display: block;
    }
    
    .dropdown-btn::after {
        content: ' ▼';
        font-size: 0.8em;
        transition: transform 0.3s;
    }
    
    .dropdown.active .dropdown-btn::after {
        transform: rotate(180deg);
    }
    
    /* Mobile Content */
    .content {
        padding: 10px;
    }
    
    .page-title {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .action-block {
        flex-direction: column;
    }
    
    .ticket {
        flex-direction: column;
        gap: 10px;
    }
    
    .wrapper {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .login {
        margin: 20px auto;
        padding: 20px;
    }
    
    .block {
        padding: 15px;
    }
    
    .action-sub-block {
        padding: 15px;
    }
}
