:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #f8fafc;
    --accent-color: #10b981;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
}

.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
}

.input-group {
    position: relative;
}

.input-field {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    min-width: 120px;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-field.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input-prefix {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-weight: 500;
    pointer-events: none;
    z-index: 1;
}

.input-field.has-prefix {
    padding-left: 40px;
}

.select-field {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    padding: 12px 24px;
    border-radius: 12px;
    border: 2px solid var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.result-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.result-item.net {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    margin: 16px -24px -24px -24px;
    padding: 20px 24px;
    border-radius: 0 0 16px 16px;
    font-weight: 700;
    font-size: 18px;
    color: var(--accent-color);
}

.result-item.total-deductions {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    margin: 8px -24px 8px -24px;
    padding: 16px 24px;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid #fecaca;
}

.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1005;
}

.language-toggle {
    position: relative;
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 4px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.language-btn {
    position: relative;
    background: none;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    z-index: 2;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
}

.language-btn.active {
    color: white;
}

.language-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 48px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 20px;
    transition: transform 0.3s ease;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.language-slider.greek {
    transform: translateX(48px);
}

.collapsible-section {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    height: fit-content;
}

.collapsible-header {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    width: 100%;
    text-align: left;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
}

.collapsible-header:hover {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.collapsible-content {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.collapsible-content.active {
    padding: 24px;
    max-height: 1000px;
}

.rotate-icon {
    transition: transform 0.3s ease;
}

.rotate-icon.rotated {
    transform: rotate(180deg);
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.checkbox-container:hover {
    border-color: var(--primary-color);
}

.checkbox-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
}

.error-message {
    color: #ef4444;
    font-size: 14px;
    margin-top: 8px;
    display: none;
}

.error-message.show {
    display: block;
}

.deductions-warning {
    display: none;
}

.deductions-warning.show {
    display: block;
}

.disclaimer-notice {
    display: block;
}

@media (max-width: 768px) {
    .container {
        padding: 12px;
    }

    .glass-card {
        margin: 12px 0;
        padding: 16px !important;
    }

    .result-card {
        padding: 16px;
    }

    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 12px 0;
    }

    .result-item.net {
        margin: 16px -16px -16px -16px;
        padding: 16px;
        flex-direction: row;
        align-items: center;
    }

    .result-item.total-deductions {
        margin: 8px -16px 8px -16px;
        padding: 12px 16px;
        flex-direction: row;
        align-items: center;
    }

    /* Ensure text doesn't overflow */
    .result-item span:first-child {
        font-size: 14px;
        line-height: 1.3;
        word-break: break-word;
        max-width: 100%;
    }

    .result-item span:last-child {
        font-weight: 600;
        font-size: 16px;
        margin-top: 2px;
    }

    .result-item.net span:first-child,
    .result-item.total-deductions span:first-child {
        font-size: 15px;
    }

    .language-selector {
        position: static;
        margin-bottom: 24px;
        text-align: center;
        padding-top: 16px;
    }

    .language-toggle {
        display: inline-flex;
        margin: 0 auto;
        transform: scale(1.1);
    }

    /* Show mobile menu button, hide desktop buttons */
    .mobile-menu-button {
        display: block !important;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1000;
    }

    .desktop-buttons {
        display: none !important;
    }

    /* Mobile header adjustments - remove the complex flex changes since buttons are hidden */
    .glass-card .flex.justify-between.items-center {
        justify-content: center;
    }

    /* Mobile specific input field adjustments */
    .input-flex-container {
        display: flex;
        gap: 6px;
        align-items: stretch;
        width: 100%;
    }

    .input-flex-container .flex-1 {
        flex: 2.5;
        min-width: 0;
        max-width: none;
    }

    .input-flex-container .w-32 {
        flex: 1;
        min-width: 80px;
        max-width: 100px;
        width: auto;
    }

    .input-field {
        min-width: 0 !important;
        width: 100%;
        padding: 10px 12px;
        font-size: 16px;
    }

    .input-field.has-prefix {
        min-width: 0 !important;
        padding-left: 32px;
    }

    .input-prefix {
        left: 12px;
        font-size: 14px;
    }

    /* Ensure grid doesn't overflow */
    .grid.md\\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Reduce container padding on very small screens */
    .glass-card .p-6,
    .glass-card .md\\:p-8 {
        padding: 16px !important;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .container {
        padding: 8px;
    }

    .glass-card {
        margin: 8px 0;
        padding: 12px !important;
    }

    .input-flex-container {
        gap: 4px;
    }

    .input-flex-container .w-32 {
        min-width: 70px;
        max-width: 85px;
    }

    .input-field {
        padding: 8px 10px;
        font-size: 16px;
    }

    .input-field.has-prefix {
        padding-left: 28px;
    }

    .input-prefix {
        left: 10px;
        font-size: 13px;
    }
}

/* Desktop specific styles */
@media (min-width: 769px) {
    .input-flex-container {
        display: flex;
        gap: 8px;
        align-items: stretch;
    }

    .input-flex-container .flex-1 {
        flex: 2;
        min-width: 200px;
    }

    .input-flex-container .w-32 {
        flex: 0 0 140px;
        width: 140px;
    }

    .input-field {
        min-width: 140px;
    }

    .input-field.has-prefix {
        min-width: 160px;
    }

    /* Align grid items to start */
    .grid.lg\\:grid-cols-3 {
        align-items: start;
    }

    /* Make the info section more compact */
    .collapsible-section {
        position: sticky;
        top: 20px;
    }
}

.footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    text-align: center;
    padding: 24px;
    margin-top: 48px;
}

.footer a {
    color: #93c5fd;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Cookie Consent Styles */
.cookie-consent-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    z-index: 1002;
    display: none;
}

.cookie-consent-backdrop.show {
    display: block;
}

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
    z-index: 1003;
    padding: 24px;
    display: none; /* Hidden by default */
    border-radius: 20px 20px 0 0;
}

.cookie-consent-banner.show {
    display: block;
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
}

.cookie-consent-text {
    flex: 1;
    min-width: 0;
}

.cookie-consent-text h4 {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.cookie-consent-text p {
    line-height: 1.5;
    margin-bottom: 8px;
}

.cookie-consent-text p:last-child {
    margin-bottom: 0;
}

.cookie-consent-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    align-items: center;
}

.cookie-btn {
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: none;
}

.cookie-btn:hover {
    transform: translateY(-1px);
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    text-decoration: none;
    padding: 12px 16px;
}

.btn-link:hover {
    color: var(--primary-dark);
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
}

.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1004;
    display: none;
}

.cookie-settings-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-settings-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.cookie-settings-panel {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.cookie-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.cookie-settings-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cookie-settings-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

.cookie-settings-content {
    padding: 24px;
}

.cookie-category {
    margin-bottom: 24px;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cookie-status.enabled {
    background: #d1fae5;
    color: #065f46;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-toggle input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

.cookie-toggle input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.cookie-settings-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .cookie-consent-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .cookie-btn {
        width: 100%;
        text-align: center;
    }
    
    .cookie-settings-panel {
        width: 95%;
        margin: 20px;
    }
}

/* Mobile Menu Styles */
.mobile-menu-button {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: none;
}

.menu-toggle {
    backdrop-filter: blur(10px);
    padding: 12px;
    font-size: 18px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-panel {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: white;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1002;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-menu-panel.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

.mobile-menu-content {
    padding: 20px 0;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 16px 20px;
    background: none;
    border: none;
    text-align: left;
    font-size: 16px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f3f4f6;
}

.mobile-menu-item:hover {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    color: var(--primary-color);
}

.mobile-menu-item:last-child {
    border-bottom: none;
}

.desktop-buttons {
    display: flex;
}

.offcanvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.offcanvas-overlay.active {
    opacity: 1;
    visibility: visible;
}

.offcanvas-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.offcanvas-panel.active {
    right: 0;
}

.offcanvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.offcanvas-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.offcanvas-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

.offcanvas-content {
    padding: 24px;
}

/* Mobile offcanvas adjustments */
@media (max-width: 480px) {
    .offcanvas-panel {
        width: 100%;
        right: -100%;
    }

    .offcanvas-header {
        padding: 16px;
    }

    .offcanvas-content {
        padding: 16px;
    }
}