/* Proxy System CSS Module */
/* File: css/modules/proxy.css */
/* Version: 4.7.0 - Extracted from main.css */
/* Created: Friday, August 8, 2025, 3:15 PM UTC+10 */
/* Purpose: Isolated proxy/composite menu system styles */

/* ===== SCALED UP COMPOSITE LAYOUT ===== */

/* Main Scaled Composite Container */
.fixed-composite-layout {
    max-width: 1000px;  /* SCALED UP: Was 800px */
    margin: 0 auto;
    padding: 0 30px;    /* SCALED UP: Was 20px */
    display: flex;
    flex-direction: column;
    gap: 25px;          /* SCALED UP: Was 20px */
}

/* Theme Colors */
.manager-theme {
    --theme-color: #667eea;
    --theme-dark: #5a67d8;
    --theme-light: rgba(102, 126, 234, 0.1);
}

.security-theme {
    --theme-color: #dc2626;
    --theme-dark: #b91c1c;
    --theme-light: rgba(220, 38, 38, 0.1);
}

/* ===== SCALED UP PROXY CONTAINER ===== */

.fixed-proxy-container {
    background: linear-gradient(135deg, var(--theme-color) 0%, var(--theme-dark) 100%);
    border-radius: 12px;        /* SCALED UP: Was 10px */
    padding: 20px 25px;         /* SCALED UP: Was 15px 20px */
    color: white;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);  /* SCALED UP: Enhanced shadow */
    transition: all 0.3s ease;
    /* SCALED UP: Much larger height */
    min-height: 120px;          /* SCALED UP: Was 85px */
    max-height: 120px;          /* SCALED UP: Was 85px */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.fixed-proxy-container.context-set {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.25);
}

/* Scaled Up Proxy Title */
.proxy-title {
    font-size: 20px;            /* SCALED UP: Was 16px */
    font-weight: 700;
    margin: 0;
    padding: 0;
    line-height: 1.3;           /* SCALED UP: Better line height */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.reset-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 4px 10px;          /* SCALED UP: Was 2px 6px */
    border-radius: 6px;         /* SCALED UP: Was 4px */
    font-size: 13px;            /* SCALED UP: Was 11px */
    cursor: pointer;
    margin-left: 15px;          /* SCALED UP: Was 10px */
    font-weight: 600;
}

.reset-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Scaled Up Single Line Form */
.single-line-form {
    display: flex;
    gap: 15px;                  /* SCALED UP: Was 10px */
    align-items: center;
    margin: 12px 0 0 0;         /* SCALED UP: Was 8px */
    flex: 1;
}

.single-line-form input,
.single-line-form select {
    flex: 1;
    padding: 12px 15px;         /* SCALED UP: Was 8px 10px */
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;         /* SCALED UP: Was 6px */
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;            /* SCALED UP: Was 14px */
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    font-weight: 500;
}

.single-line-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.single-line-form input:focus,
.single-line-form select:focus {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);  /* SCALED UP: Enhanced focus */
}

.single-line-form select option {
    background: #2c3e50;
    color: white;
    padding: 8px;
}

.inline-submit-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 18px;         /* SCALED UP: Was 8px 12px */
    border-radius: 8px;         /* SCALED UP: Was 6px */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;            /* SCALED UP: Was 13px */
    white-space: nowrap;
    flex-shrink: 0;
}

.inline-submit-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ===== SCALED UP TICKETS CONTAINER ===== */

.fixed-tickets-container {
    background: rgba(248, 250, 252, 0.95);  /* SCALED UP: Better opacity */
    border-radius: 12px;        /* SCALED UP: Was 10px */
    padding: 25px 30px;         /* SCALED UP: Was 15px 20px */
    border: 2px solid #e5e7eb;
    /* SCALED UP: Much larger height for better buttons */
    min-height: 320px;          /* SCALED UP: Was 240px */
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.tickets-title {
    font-size: 20px;            /* SCALED UP: Was 16px */
    font-weight: 600;
    color: #374151;
    text-align: center;
    margin: 0 0 20px 0;         /* SCALED UP: Was 15px */
    line-height: 1.3;
}

/* SCALED UP: 2x3 Portrait Grid with Larger Buttons */
.fixed-ticket-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 18px;                  /* SCALED UP: Was 12px */
    flex: 1;
    transition: all 0.3s ease;
}

.fixed-ticket-grid.proxy-disabled {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(80%);
}

.fixed-ticket-grid.proxy-enabled {
    opacity: 1;
    pointer-events: auto;
    filter: none;
}

/* SCALED UP: Much Larger Ticket Items */
.fixed-ticket-item {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;        /* SCALED UP: Was 8px */
    padding: 20px;              /* SCALED UP: Was 12px */
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);  /* SCALED UP: Enhanced shadow */
    min-height: 85px;           /* SCALED UP: Was 60px */
}

.fixed-ticket-item:hover {
    transform: translateY(-3px);  /* SCALED UP: Was -2px */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);  /* SCALED UP: Enhanced hover */
    border-color: var(--theme-color);
}

.fixed-ticket-item .menu-icon {
    font-size: 32px;            /* SCALED UP: Was 20px */
    margin-bottom: 8px;         /* SCALED UP: Was 4px */
    color: var(--theme-color);
}

.fixed-ticket-item .menu-content-text h3 {
    margin: 0 0 4px 0;          /* SCALED UP: Was 2px */
    font-size: 16px;            /* SCALED UP: Was 13px */
    font-weight: 600;
    color: #374151;
    line-height: 1.2;
}

.fixed-ticket-item .menu-content-text p {
    margin: 0;
    font-size: 13px;            /* SCALED UP: Was 10px */
    color: #6b7280;
    line-height: 1.3;
}

/* SCALED UP: Larger Proxy Indicators */
.fixed-ticket-item .proxy-indicator {
    position: absolute;
    top: 8px;                   /* SCALED UP: Was 4px */
    right: 8px;                 /* SCALED UP: Was 4px */
    width: 24px;                /* SCALED UP: Was 16px */
    height: 24px;               /* SCALED UP: Was 16px */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;            /* SCALED UP: Was 8px */
    font-weight: bold;
    background: var(--theme-color);
    color: white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);  /* SCALED UP: Enhanced shadow */
    animation: pulse 2s infinite;
}

/* Disabled Items */
.disabled-in-proxy {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(100%);
}

.disabled-in-proxy:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #e5e7eb;
}

/* ===== SCALED UP FUNCTIONS CONTAINER ===== */

.fixed-functions-container {
    background: rgba(248, 250, 252, 0.95);
    border-radius: 12px;        /* SCALED UP: Was 10px */
    padding: 20px 25px;         /* SCALED UP: Was 15px 20px */
    border: 2px solid #e5e7eb;
    /* SCALED UP: Same height as proxy container */
    min-height: 120px;          /* SCALED UP: Was 85px */
    max-height: 120px;          /* SCALED UP: Was 85px */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.functions-title {
    font-size: 20px;            /* SCALED UP: Was 16px */
    font-weight: 700;
    color: #374151;
    margin: 0;
    line-height: 1.3;
    text-align: center;
}

.fixed-functions-btn {
    background: linear-gradient(135deg, var(--theme-color) 0%, var(--theme-dark) 100%);
    border: 2px solid var(--theme-color);
    color: white;
    border-radius: 8px;         /* SCALED UP: Was 6px */
    padding: 15px 20px;         /* SCALED UP: Was 8px 16px */
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;            /* SCALED UP: Was 13px */
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);  /* SCALED UP: Enhanced shadow */
    margin: 12px 0 0 0;         /* SCALED UP: Was 8px */
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
}

.fixed-functions-btn:hover {
    transform: translateY(-3px);  /* SCALED UP: Was -2px */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);  /* SCALED UP: Enhanced hover */
    background: linear-gradient(135deg, var(--theme-dark) 0%, var(--theme-color) 100%);
}

/* ===== ANIMATIONS ===== */

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.fixed-ticket-grid.proxy-enabled .fixed-ticket-item {
    animation: slideInUp 0.4s ease-out;  /* SCALED UP: Slightly longer */
    animation-fill-mode: backwards;
}

.fixed-ticket-grid.proxy-enabled .fixed-ticket-item:nth-child(1) { animation-delay: 0.05s; }
.fixed-ticket-grid.proxy-enabled .fixed-ticket-item:nth-child(2) { animation-delay: 0.1s; }
.fixed-ticket-grid.proxy-enabled .fixed-ticket-item:nth-child(3) { animation-delay: 0.15s; }
.fixed-ticket-grid.proxy-enabled .fixed-ticket-item:nth-child(4) { animation-delay: 0.2s; }
.fixed-ticket-grid.proxy-enabled .fixed-ticket-item:nth-child(5) { animation-delay: 0.25s; }
.fixed-ticket-grid.proxy-enabled .fixed-ticket-item:nth-child(6) { animation-delay: 0.3s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);  /* SCALED UP: Was 15px */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fixed-proxy-container.context-set {
    animation: contextSuccess 0.5s ease-out;
}

@keyframes contextSuccess {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 8px 25px rgba(16, 185, 129, 0.35);
    }
    100% {
        transform: scale(1);
    }
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 1024px) {
    .fixed-composite-layout {
        max-width: 900px;
        padding: 0 25px;
    }
}

@media (max-width: 768px) {
    .fixed-composite-layout {
        padding: 0 20px;
        gap: 20px;
        max-width: 100%;
    }
    
    .fixed-proxy-container {
        padding: 18px 20px;
        min-height: 110px;
        max-height: 110px;
    }
    
    .proxy-title {
        font-size: 18px;
    }
    
    .single-line-form {
        flex-direction: column;
        gap: 12px;
        margin: 10px 0 0 0;
    }
    
    .single-line-form input,
    .single-line-form select {
        font-size: 15px;
        padding: 10px 12px;
    }
    
    .inline-submit-btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
    
    .fixed-tickets-container {
        padding: 20px 22px;
        min-height: 280px;
    }
    
    .tickets-title {
        font-size: 18px;
        margin-bottom: 18px;
    }
    
    .fixed-ticket-grid {
        gap: 15px;
    }
    
    .fixed-ticket-item {
        min-height: 75px;
        padding: 16px;
    }
    
    .fixed-ticket-item .menu-icon {
        font-size: 26px;
        margin-bottom: 6px;
    }
    
    .fixed-ticket-item .menu-content-text h3 {
        font-size: 14px;
    }
    
    .fixed-ticket-item .menu-content-text p {
        font-size: 11px;
    }
    
    .fixed-ticket-item .proxy-indicator {
        width: 20px;
        height: 20px;
        font-size: 10px;
        top: 6px;
        right: 6px;
    }
    
    .fixed-functions-container {
        padding: 18px 20px;
        min-height: 110px;
        max-height: 110px;
    }
    
    .functions-title {
        font-size: 18px;
    }
    
    .fixed-functions-btn {
        font-size: 14px;
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .fixed-composite-layout {
        padding: 0 15px;
        gap: 18px;
    }
    
    .fixed-proxy-container {
        padding: 15px 18px;
        min-height: 100px;
        max-height: 100px;
    }
    
    .proxy-title {
        font-size: 16px;
    }
    
    .single-line-form input,
    .single-line-form select {
        font-size: 14px;
        padding: 8px 10px;
    }
    
    .inline-submit-btn {
        font-size: 13px;
        padding: 10px;
    }
    
    .reset-btn {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .fixed-tickets-container {
        padding: 18px 20px;
        min-height: 250px;
    }
    
    .tickets-title {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .fixed-ticket-grid {
        gap: 12px;
    }
    
    .fixed-ticket-item {
        min-height: 65px;
        padding: 12px;
    }
    
    .fixed-ticket-item .menu-icon {
        font-size: 22px;
        margin-bottom: 4px;
    }
    
    .fixed-ticket-item .menu-content-text h3 {
        font-size: 13px;
    }
    
    .fixed-ticket-item .menu-content-text p {
        font-size: 10px;
    }
    
    .fixed-ticket-item .proxy-indicator {
        width: 18px;
        height: 18px;
        font-size: 9px;
        top: 4px;
        right: 4px;
    }
    
    .fixed-functions-container {
        padding: 15px 18px;
        min-height: 100px;
        max-height: 100px;
    }
    
    .functions-title {
        font-size: 16px;
    }
    
    .fixed-functions-btn {
        font-size: 13px;
        padding: 10px 14px;
    }
}

/* ===== ACCESSIBILITY ===== */

.fixed-functions-btn:focus,
.fixed-ticket-item:focus,
.inline-submit-btn:focus {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 3px;  /* SCALED UP: Was 2px */
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .fixed-proxy-container {
        border: 3px solid white;
    }
    
    .fixed-ticket-item {
        border-width: 3px;
    }
    
    .fixed-functions-btn {
        border-width: 3px;
    }
    
    .proxy-indicator {
        border: 2px solid white;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .fixed-ticket-item .proxy-indicator {
        animation: none;
    }
    
    .fixed-ticket-grid.proxy-enabled .fixed-ticket-item {
        animation: none;
    }
    
    .fixed-proxy-container.context-set {
        animation: none;
    }
    
    * {
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .fixed-functions-container {
        display: none;
    }
    
    .fixed-proxy-container {
        background: #f3f4f6 !important;
        color: #000 !important;
        box-shadow: none !important;
    }
    
    .fixed-ticket-item {
        break-inside: avoid;
    }
}

/* Enhanced Hover Effects */
.fixed-ticket-item:hover .menu-icon {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.fixed-ticket-item:hover .proxy-indicator {
    animation-duration: 1s;
}

/* Container Shadow Consistency */
.fixed-proxy-container,
.fixed-tickets-container,
.fixed-functions-container {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.fixed-proxy-container:hover,
.fixed-functions-container:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Loading States */
.fixed-functions-btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.fixed-functions-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;                /* SCALED UP: Was 16px */
    height: 20px;               /* SCALED UP: Was 16px */
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.inline-submit-btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.inline-submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;                /* SCALED UP: Was 12px */
    height: 16px;               /* SCALED UP: Was 12px */
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Theme Color Consistency */
.manager-theme .fixed-ticket-item:hover {
    border-color: #667eea;
}

.security-theme .fixed-ticket-item:hover {
    border-color: #dc2626;
}

.manager-theme .fixed-ticket-item .menu-icon {
    color: #667eea;
}

.security-theme .fixed-ticket-item .menu-icon {
    color: #dc2626;
}

.manager-theme .proxy-indicator {
    background: #667eea;
}

.security-theme .proxy-indicator {
    background: #dc2626;
}