/* Custom styles for PocketForms */

:root {
    --primary: #0066cc;
    --primary-dark: #0052a3;
    --gray: #6b7280;
    --gray-light: #e5e7eb;
    --dark: #1f2937;
    --primary-color: #0066cc;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    flex: 1;
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.card-header {
    border-radius: 0.5rem 0.5rem 0 0 !important;
    font-weight: 500;
}

/* Form Elements */
.form-select, .form-control {
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-select:focus, .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* JSON Editor Customization */
#jsonEditorContainer {
    min-height: 300px;
}

.je-object__title {
    background-color: var(--light-color);
    padding: 0.5rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.je-form-input-label {
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--dark-color);
}

.je-form-input-description {
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-top: 0.25rem;
}

.je-form-input-error {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Validation states */
.is-invalid {
    border-color: var(--danger-color) !important;
}

.is-valid {
    border-color: var(--success-color) !important;
}

/* Admin Panel */
#adminPanel textarea {
    font-size: 0.875rem;
    font-family: 'Courier New', Courier, monospace;
}

#submissionsList {
    max-height: 400px;
    overflow-y: auto;
}

.submission-item {
    cursor: pointer;
    transition: background-color 0.2s;
}

.submission-item:hover {
    background-color: var(--light-color);
}

.submission-data {
    font-size: 0.875rem;
    font-family: 'Courier New', Courier, monospace;
    background-color: #f8f9fa;
    padding: 0.5rem;
    border-radius: 0.25rem;
    margin-top: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

/* Messages/Toasts */
.toast {
    min-width: 300px;
}

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

.toast-error {
    background-color: var(--danger-color);
    color: white;
}

.toast-warning {
    background-color: var(--warning-color);
    color: var(--dark-color);
}

.toast-info {
    background-color: var(--info-color);
    color: white;
}

/* Loading State */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.btn:active {
    transform: translateY(0);
}

/* Einheitliche Button-Größen für konsistentes Design */
.btn-uniform {
    width: 180px !important;
    height: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-uniform-sm {
    width: 140px !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-uniform-lg {
    width: 220px !important;
    height: 48px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Icons in einheitlichen Buttons */
.btn-uniform i,
.btn-uniform-sm i,
.btn-uniform-lg i {
    margin-right: 0.5rem;
}

/* Button-Gruppen mit einheitlichen Buttons */
.btn-group-uniform {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-group-uniform-horizontal {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
}

/* Responsive Anpassungen für einheitliche Buttons */
@media (max-width: 768px) {
    .btn-uniform,
    .btn-uniform-sm,
    .btn-uniform-lg {
        width: 100% !important;
        max-width: 280px !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    #adminPanel .row > div {
        margin-bottom: 2rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Accessibility */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Print Styles */
@media print {
    .navbar, footer, #adminPanel, .btn-group {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}

/* ============================================
   CITYCHALLENGE LOGIN STYLES - EXAKT AUS REFERENZPROJEKT
   ============================================ */

/* Login Screen - New Design */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}

.login-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 1200px;
    min-height: 600px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Left Side - Branding */
.login-branding {
    background: linear-gradient(135deg, var(--primary) 0%, #1e3a8a 100%);
    padding: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.branding-content {
    text-align: center;
}

.logo-large {
    margin-bottom: 2rem;
    display: inline-block;
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: white;
}

.brand-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 3rem;
}

.features-list {
    text-align: left;
    display: inline-block;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* Right Side - Login Form */
.login-form-section {
    padding: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--dark);
}

.login-header p {
    color: var(--gray);
    font-size: 1rem;
}

/* Input with Icons */
.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    pointer-events: none;
    z-index: 2;
}

.input-icon input {
    padding-left: 3rem;
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #1e3a8a 100%);
    border: none;
    color: white;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e3a8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
    color: white;
}

.login-footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-light);
}

.login-footer p {
    color: var(--gray);
    font-size: 0.875rem;
    margin: 0;
}

/* Input Groups */
.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark);
    display: block;
}

/* Password Toggle Button */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    z-index: 2;
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--primary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .login-content {
        grid-template-columns: 1fr;
        min-height: auto;
        border-radius: 0;
        box-shadow: none;
    }
    
    .login-branding {
        padding: 2rem;
        min-height: 40vh;
    }
    
    .brand-title {
        font-size: 2rem;
    }
    
    .login-form-section {
        padding: 2rem;
    }
    
    .features-list {
        display: none;
    }
}