/* Core CSS - Base styles and layout */

/* Hosted Version Banner */
.hosted-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.3s ease-out;
}

.hosted-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.hosted-banner-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.hosted-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hosted-banner-text strong {
    font-size: 16px;
    font-weight: 600;
}

.hosted-banner-text span {
    font-size: 13px;
    opacity: 0.95;
}

.hosted-banner-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.hosted-banner-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .hosted-banner-text span {
        display: none;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
}

.header {
    background: #2c3e50;
    color: white;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.tabs {
    display: flex;
    background: white;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    justify-content: space-between;
    align-items: center;
}

.tab {
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    font-weight: 500;
}

.tab:hover {
    background: #f8f9fa;
}

.tab.active {
    border-bottom-color: #3498db;
    color: #3498db;
    background: white;
}

.tab-content {
    display: none;
    padding: 2rem;
    background: white;
    min-height: calc(100vh - 120px);
}

.tab-content.active {
    display: block;
}

/* Button styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-compact {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-tiny {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Form styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Utility classes */
.empty-state {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 2rem;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.hidden {
    display: none;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

.success {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

/* Unsaved changes indicator */
.has-changes {
    background: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #000 !important;
    font-weight: bold;
}

.has-changes:hover {
    background: #e0a800 !important;
    border-color: #d39e00 !important;
}

/* Split Button Styles */
.split-button-group {
    position: relative;
    display: inline-flex;
    align-items: stretch;
}

.split-button-main {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.split-button-dropdown {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding: 0.75rem 0.75rem;
    min-width: auto;
    font-size: 0.8rem;
}

.split-button-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.25rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 200px;
}

.split-button-menu .menu-item {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: left;
    border: none;
    background: white;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.95rem;
}

.split-button-menu .menu-item:first-child {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.split-button-menu .menu-item:last-child {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

.split-button-menu .menu-item:hover {
    background: #f8f9fa;
}

.split-button-menu .menu-item:not(:last-child) {
    border-bottom: 1px solid #eee;
}

.btn-warning {
    background: #ffc107;
    color: #000;
}

.btn-warning:hover {
    background: #e0a800;
}

/* Download Modal Styles */
.download-instructions {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #495057;
}

.install-note-small {
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    font-size: 0.9rem;
}

.download-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.download-link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    transition: all 0.2s;
}

.download-link-item:hover {
    background: #e9ecef;
    border-color: #3498db;
}

.download-link-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.download-link-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.download-link-description {
    color: #6c757d;
    font-size: 0.875rem;
}

.download-link-button {
    padding: 0.5rem 1.5rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}

.download-link-button:hover {
    background: #2980b9;
}

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

.download-zip-item {
    background: #e7f3ff;
    border-color: #3498db;
}

.download-zip-item .download-link-name {
    color: #2980b9;
}