/* Login button */
.login-button {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background-color: #FF6E00;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.login-button:hover {
    background-color: #e66200;
    color: white;
    text-decoration: none;
}

.login-button i {
    margin-right: 8px;
}

/**
 * Contract Editor - Layout Styles
 * Styles for the application header, footer, and overall layout
 * Enhanced version with modern design principles
 */

:root {
    /* Base colors */
    --primary: #FF6E00;
    --primary-light: #ff8c3a;
    --primary-dark: #e05e00;
    --secondary: #044B7F;
    --secondary-light: #0a6cb3;
    --secondary-dark: #033a63;

    /* Neutral colors */
    --neutral-50: #f8f9fa;
    --neutral-100: #f0f2f5;
    --neutral-200: #e9ecef;
    --neutral-300: #dee2e6;
    --neutral-400: #ced4da;
    --neutral-500: #adb5bd;
    --neutral-600: #6c757d;
    --neutral-700: #495057;
    --neutral-800: #343a40;
    --neutral-900: #212529;

    /* Utility colors */
    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;

    /* Spacing */
    --space-xs: 5px;
    --space-sm: 10px;
    --space-md: 15px;
    --space-lg: 20px;
    --space-xl: 30px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;

    /* Font */
    --font-sans: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-heading: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

    /* Layout */
    --header-height: 60px;
    --footer-height: 80px;
}

/* Base styles */
body {
    font-family: var(--font-sans);
    color: var(--neutral-800);
    line-height: 1.5;
    background-color: var(--neutral-100);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* App Header */
.app-header {
    background-color: white;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--neutral-200);
    padding: 0 var(--space-xl);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
}

.app-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 var(--space-xl);
}

.app-logo a {
    display: flex;
    align-items: center;
    font-size: 1.4rem;
    font-weight: 600;
    font-family: var(--font-heading);
    color: var(--secondary);
    text-decoration: none;
}

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

.app-logo i {
    margin-right: var(--space-sm);
    color: var(--primary);
    font-size: 1.6rem;
}

/* Navigation */
.app-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.app-nav nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--space-xl);
}

.app-nav nav li {
    position: relative;
}

.app-nav nav a {
    display: flex;
    align-items: center;
    padding: 0 var(--space-sm);
    height: var(--header-height);
    color: var(--neutral-700);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
    gap: var(--space-xs);
}

.app-nav nav a:hover {
    color: var(--primary);
    text-decoration: none;
}

.app-nav nav li.active a {
    color: var(--primary);
    box-shadow: inset 0 -3px 0 var(--primary);
}

.app-nav nav i {
    font-size: 1rem;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-button {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    color: var(--neutral-700);
    font-weight: 500;
    gap: var(--space-sm);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.user-button:hover {
    background-color: var(--neutral-100);
    color: var(--primary);
}

.user-button i:first-child {
    font-size: 1.4rem;
    color: var(--primary);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background-color: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--neutral-200);
    min-width: 180px;
    z-index: 10001;
    /* Significantly increased to ensure it's above editor toolbars */
    /* Increased to ensure it's above header (z-index: 100) */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-fast);
}

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

.user-dropdown ul {
    list-style: none;
    margin: 0;
    padding: var(--space-sm) 0;
}

.user-dropdown li {
    padding: 0;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    color: var(--neutral-700);
    text-decoration: none;
    transition: all var(--transition-fast);
    gap: var(--space-sm);
}

.user-dropdown a:hover {
    background-color: var(--neutral-100);
    color: var(--primary);
    text-decoration: none;
}

.user-dropdown i {
    width: 20px;
    text-align: center;
}

/* App Container */
.app-container {
    flex: 1;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* App Footer */
.app-footer {
    background-color: var(--neutral-800);
    color: white;
    padding: var(--space-xl) 0;
    margin-top: auto;
}

.footer-content {
    padding: 0 var(--space-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    gap: var(--space-sm);
}

.footer-logo i {
    color: var(--primary);
    font-size: 1.4rem;
}

.footer-links {
    display: flex;
    gap: var(--space-xl);
}

.footer-links a {
    color: var(--neutral-300);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
    text-decoration: none;
}

.footer-content p {
    margin: 0;
    color: var(--neutral-500);
    font-size: 0.9rem;
}

/* Editor section styles */
.editor-section {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--neutral-200);
}

.editor-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.editor-section h4 {
    color: var(--secondary);
    font-size: 1rem;
    margin-top: 0;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.editor-section h4 i {
    color: var(--primary);
}

/* Properties section styles */
.properties-section {
    margin-top: var(--space-xl);
    padding-top: var(--space-md);
    border-top: 1px solid var(--neutral-200);
}

.properties-section h4 {
    color: var(--secondary);
    font-size: 1rem;
    margin-top: 0;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.properties-section h4 i {
    color: var(--primary);
}

/* Form text helper */
.form-text {
    display: block;
    margin-top: var(--space-xs);
    font-size: 0.8rem;
    color: var(--neutral-600);
}

/* Empty states */
.empty-components {
    text-align: center;
    padding: var(--space-xl) 0;
    color: var(--neutral-600);
}

.empty-components i {
    font-size: 2rem;
    color: var(--neutral-400);
    margin-bottom: var(--space-md);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .app-nav {
        display: none;
        /* Hide navigation on smaller screens */
    }

    .app-header-content {
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .app-header {
        padding: 0 var(--space-md);
    }

    .app-container {
        padding: 0 var(--space-md);
    }

    .app-footer {
        padding: var(--space-lg) var(--space-md);
    }

    .footer-content {
        padding: 0;
    }

    .app-logo a {
        font-size: 1.2rem;
    }

    .app-logo i {
        font-size: 1.5rem;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: var(--space-md);
    }
}

@media (max-width: 480px) {
    .app-header {
        padding: 0 var(--space-sm);
    }

    .app-container {
        padding: 0 var(--space-sm);
    }

    .app-logo span {
        display: none;
        /* Hide text logo on very small screens */
    }

    .app-logo i {
        margin-right: 0;
        font-size: 1.8rem;
    }

    .user-button span {
        display: none;
    }
}

/* Italian language specific adjustments */
.it-lang {
    font-family: var(--font-sans);
}

.it-lang h1,
.it-lang h2,
.it-lang h3,
.it-lang .app-logo,
.it-lang .app-nav {
    font-family: var(--font-heading);
}