/* Custom styles for the admin login page */

/* Add a container for the Three.js animation that covers the entire viewport */
#three-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -10;
    pointer-events: none;
    overflow: hidden;
}

/* Style for the logo container */
.admin-custom-logo-container {
    padding: 1rem 0;
    text-align: center;
    position: relative;
    z-index: 1;
    margin-bottom: 1.5rem;
}

/* Make sure the login form has a semi-transparent background */
.login #container {
    background-color: rgba(255, 255, 255, 0.85);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

/* Dark mode support */
.dark .login #container {
    background-color: rgba(30, 41, 59, 0.85);
}

/* Logo is now handled by JavaScript with proper dark/light mode support */

/* Contact Login Management Styles */
.contact-login-form {
    background: #f8f9fa !important;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 12px;
    margin-top: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.contact-login-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    color: #495057;
    font-size: 12px;
}

.contact-login-form input[type="text"],
.contact-login-form input[type="password"] {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ced4da;
    border-radius: 3px;
    font-size: 12px;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.contact-login-form input[type="text"]:focus,
.contact-login-form input[type="password"]:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.25);
}

.contact-login-edit-btn {
    background: #007cba !important;
    color: white !important;
    border: none !important;
    padding: 4px 8px !important;
    border-radius: 3px !important;
    cursor: pointer !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    transition: background-color 0.2s ease;
}

.contact-login-edit-btn:hover {
    background: #005a87 !important;
}

.contact-login-update-btn {
    background: #28a745 !important;
    color: white !important;
    border: none !important;
    padding: 4px 12px !important;
    border-radius: 3px !important;
    cursor: pointer !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    margin-right: 5px !important;
    transition: background-color 0.2s ease;
}

.contact-login-update-btn:hover {
    background: #218838 !important;
}

.contact-login-update-btn:disabled {
    background: #6c757d !important;
    cursor: not-allowed !important;
}

.contact-login-cancel-btn {
    background: #6c757d !important;
    color: white !important;
    border: none !important;
    padding: 4px 12px !important;
    border-radius: 3px !important;
    cursor: pointer !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    transition: background-color 0.2s ease;
}

.contact-login-cancel-btn:hover {
    background: #5a6268 !important;
}

/* Ensure the login column has proper width */
.field-login_actions {
    min-width: 120px;
    white-space: nowrap;
}

/* Dark mode support for contact login forms */
.dark .contact-login-form {
    background: #374151 !important;
    border-color: #4b5563;
    color: #f9fafb;
}

.dark .contact-login-form label {
    color: #f9fafb;
}

.dark .contact-login-form input[type="text"],
.dark .contact-login-form input[type="password"] {
    background: #4b5563;
    border-color: #6b7280;
    color: #f9fafb;
}

.dark .contact-login-form input[type="text"]:focus,
.dark .contact-login-form input[type="password"]:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

/* Article Description Field Height Adjustment */
/* Make Article description field in inline forms have the same height as other fields */

/* Primary selectors for Article description fields */
.inline-group .form-row .field-description textarea,
#article_set-group .form-row .field-description textarea,
.tabular .field-description textarea,
.inline-related .field-description textarea,
.dynamic-article_set .field-description textarea,
[id*="article"] .field-description textarea {
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    resize: none !important;
    overflow-y: auto !important;
    line-height: 1.2 !important;
    padding: 6px 8px !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
    vertical-align: top !important;
}

/* Additional specific selectors for Django admin inline forms */
.module .tabular .field-description textarea,
.module .inline-group .field-description textarea,
.inline-tabular .field-description textarea,
.form-row .field-description textarea {
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    resize: none !important;
    overflow-y: auto !important;
    line-height: 1.2 !important;
    padding: 6px 8px !important;
    font-size: 13px !important;
}

/* Ensure consistent styling with other input fields */
.inline-group .form-row .field-description textarea:focus,
#article_set-group .form-row .field-description textarea:focus,
.tabular .field-description textarea:focus,
.inline-related .field-description textarea:focus,
.dynamic-article_set .field-description textarea:focus,
[id*="article"] .field-description textarea:focus {
    outline: none !important;
    border-color: #007cba !important;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.25) !important;
}

/* Dark mode support for article description fields */
.dark .inline-group .form-row .field-description textarea,
.dark #article_set-group .form-row .field-description textarea,
.dark .tabular .field-description textarea,
.dark .inline-related .field-description textarea,
.dark .dynamic-article_set .field-description textarea,
.dark [id*="article"] .field-description textarea {
    background: #374151 !important;
    border-color: #4b5563 !important;
    color: #f9fafb !important;
}

.dark .inline-group .form-row .field-description textarea:focus,
.dark #article_set-group .form-row .field-description textarea:focus,
.dark .tabular .field-description textarea:focus,
.dark .inline-related .field-description textarea:focus,
.dark .dynamic-article_set .field-description textarea:focus,
.dark [id*="article"] .field-description textarea:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25) !important;
}

/* Fallback universal selector for any description textarea in admin */
textarea[name*="description"] {
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    resize: none !important;
    overflow-y: auto !important;
    line-height: 1.2 !important;
    padding: 6px 8px !important;
    font-size: 13px !important;
}

/* Override for main campaign description field to keep it larger */
#id_description {
    height: auto !important;
    min-height: 80px !important;
    max-height: none !important;
    resize: vertical !important;
}