﻿/* ==================================================
   EDIT FOOTER CONTENT MODAL STYLES - Company Intro Page Specific
   ==================================================

   This file contains SPECIFIC styles for the Edit Footer Content Modal
   (#editFooterModal) used on the company intro page. It inherits base
   modal styles from ../shared/modals.css and adds footer editing
   specific functionality.

   IMPORTANT: This file works WITH modals.css, not instead of it!

   Features:
   - Clean footer editing interface
   - Icon-based field layout
   - Company footer information editing
   - Form validation styling
   - Professional appearance matching brand

   Last Updated: [Current Date]
   ================================================== */

/* ==================================================
   1. EDIT FOOTER MODAL Z-INDEX (Required for proper layering)
   ================================================== */

#editFooterModal {
    z-index: 10000 !important;
}

#editFooterModal .modal-dialog {
    z-index: 10000 !important;
}

#editFooterModal .modal-content {
    z-index: 10000 !important;
}

/* ==================================================
   2. EDIT FOOTER MODAL LAYOUT & STRUCTURE
   ================================================== */

/* Edit Footer Modal Dialog */
#editFooterModal .modal-dialog {
    max-width: 600px;
}

/* Edit Footer Modal Content - Shared Styling */
#editFooterModal .modal-content {
    background: linear-gradient(135deg, #ffffff, #f0f4f8) !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15) !important;
    border: 1px solid #e0e4e8 !important;
    overflow: hidden !important;
}

/* Edit Footer Modal Header - Shared Styling */
#editFooterModal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    padding: 20px !important;
    border-bottom: none !important;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3) !important;
    border-radius: 16px 16px 0 0 !important;
}

/* Edit Footer Modal Body */
#editFooterModal .modal-body {
    padding: 25px !important;
    background-color: #ffffff !important;
    min-height: 250px;
}

/* Edit Footer Modal Footer - Shared Styling */
#editFooterModal .modal-footer {
    background-color: #f1f5f9 !important;
    padding: 20px !important;
    border-top: 1px solid #e0e4e8 !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 15px !important;
    border-radius: 0 0 16px 16px !important;
}

/* ==================================================
   3. FOOTER EDITOR CONTAINER
   ================================================== */

/* Footer Editor Container */
.footer-editor-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: linear-gradient(135deg, #f8faff 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.05);
}

/* Footer Editor Form Group */
.footer-editor-container .form-group {
    margin-bottom: 0;
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 15px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.footer-editor-container .form-group:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.footer-editor-container .form-group:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* ==================================================
   4. FOOTER FIELD LABELS
   ================================================== */

/* Footer Field Labels */
.footer-editor-container label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.footer-editor-container .form-group:focus-within label {
    color: #667eea;
}

/* Footer Field Label Icons */
.footer-editor-container label i {
    color: #667eea;
    width: 18px;
    font-size: 16px;
    flex-shrink: 0;
}

/* ==================================================
   5. FOOTER INPUT FIELDS
   ================================================== */

/* Footer Input Fields */
.footer-editor-container .form-control {
    width: 100%;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 15px;
    font-size: 14px;
    color: #374151;
    background: #ffffff;
    transition: all 0.3s ease;
    font-weight: 500;
}

.footer-editor-container .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
    background: #fafbff;
}

.footer-editor-container .form-control::placeholder {
    color: #9ca3af;
    font-style: italic;
    font-weight: 400;
}

/* Input Focus Effect */
.footer-editor-container .form-group::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 1px;
}

.footer-editor-container .form-group:focus-within::after {
    width: 100%;
}

/* ==================================================
   6. FIELD-SPECIFIC STYLING
   ================================================== */

/* Company Name Field */
.footer-editor-container .form-group:nth-child(1) {
    border-left: 4px solid #667eea;
}

.footer-editor-container .form-group:nth-child(1) label i {
    color: #667eea;
}

/* Address Field */
.footer-editor-container .form-group:nth-child(2) {
    border-left: 4px solid #10b981;
}

.footer-editor-container .form-group:nth-child(2) label i {
    color: #10b981;
}

/* Phone & Website Field */
.footer-editor-container .form-group:nth-child(3) {
    border-left: 4px solid #f59e0b;
}

.footer-editor-container .form-group:nth-child(3) label i {
    color: #f59e0b;
}

/* ==================================================
   7. MODAL FOOTER BUTTONS - SHARED STYLING
   ================================================== */

/* Edit Footer Modal Footer Buttons */
#editFooterModal .modal-footer .btn {
    padding: 12px 24px !important;
    border-radius: 10px !important;
    font-weight: 500 !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

#editFooterModal .modal-footer .btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important;
}

/* Primary Button - Shared Purple Style */
#editFooterModal .modal-footer .btn-primary {
    background: #667eea !important;
    color: white !important;
}

#editFooterModal .modal-footer .btn-primary:hover {
    background: #5a67d8 !important;
}

#editFooterModal .modal-footer .btn-primary:disabled {
    background: #cccccc !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Secondary Button - Shared Gray Style */
#editFooterModal .modal-footer .btn-secondary {
    background: #6b7280 !important;
    color: white !important;
}

#editFooterModal .modal-footer .btn-secondary:hover {
    background: #5a5d63 !important;
}

/* Success Button - Shared Green Style */
#editFooterModal .modal-footer .btn-success {
    background: #10b981 !important;
    color: white !important;
}

#editFooterModal .modal-footer .btn-success:hover {
    background: #059669 !important;
}

/* ==================================================
   8. VALIDATION STATES
   ================================================== */

/* Valid Input State */
.footer-editor-container .form-control.valid {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.footer-editor-container .form-group:has(.form-control.valid)::after {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Invalid Input State */
.footer-editor-container .form-control.invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.footer-editor-container .form-group:has(.form-control.invalid)::after {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Validation Message */
.validation-message {
    font-size: 12px;
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.validation-message.error {
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.validation-message.success {
    color: #059669;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.validation-message i {
    width: 14px;
}

/* ==================================================
   9. FOOTER PREVIEW SECTION
   ================================================== */

/* Footer Preview Container */
.footer-preview {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    border-radius: 8px;
    color: white;
    border: 1px solid #4b5563;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.footer-preview h6 {
    color: #e5e7eb;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-preview h6 i {
    color: #667eea;
}

.footer-preview-content {
    font-size: 13px;
    line-height: 1.5;
}

.footer-preview-content p {
    margin: 0 0 5px 0;
    color: #d1d5db;
}

.footer-preview-content p:last-child {
    margin-bottom: 0;
}

/* ==================================================
   10. RESPONSIVE DESIGN
   ================================================== */

/* Tablet responsiveness */
@media (max-width: 768px) {
    #editFooterModal .modal-dialog {
        max-width: 95vw;
        margin: 10px;
    }

    #editFooterModal .modal-body {
        padding: 20px 15px !important;
    }

    .footer-editor-container {
        padding: 15px;
        gap: 15px;
    }

    .footer-editor-container .form-group {
        padding: 12px;
    }

    .footer-editor-container label {
        font-size: 13px;
        gap: 6px;
    }

    .footer-editor-container .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }

    .footer-preview {
        margin-top: 15px;
        padding: 12px;
    }
}

/* Mobile responsiveness */
@media (max-width: 576px) {
    #editFooterModal .modal-dialog {
        max-width: 98vw;
        margin: 5px;
    }

    #editFooterModal .modal-header {
        padding: 15px !important;
    }

    #editFooterModal .modal-body {
        padding: 15px 12px !important;
        min-height: 200px;
    }

    #editFooterModal .modal-footer {
        padding: 15px !important;
        flex-direction: column;
        gap: 10px;
    }

    #editFooterModal .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-editor-container {
        padding: 12px;
        gap: 12px;
        border-radius: 8px;
    }

    .footer-editor-container .form-group {
        padding: 10px;
        border-radius: 6px;
    }

    .footer-editor-container label {
        font-size: 12px;
        gap: 6px;
        margin-bottom: 8px;
    }

    .footer-editor-container .form-control {
        padding: 8px 10px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 4px;
    }

    .footer-preview {
        margin-top: 12px;
        padding: 10px;
        border-radius: 6px;
    }

    .footer-preview h6 {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .footer-preview-content {
        font-size: 12px;
    }
}

/* ==================================================
   11. ACCESSIBILITY & FOCUS STATES
   ================================================== */

/* Enhanced focus states for accessibility */
.footer-editor-container .form-control:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    .footer-editor-container,
    .footer-editor-container .form-group {
        border-width: 2px;
    }

    .footer-preview {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .footer-editor-container .form-group,
    .footer-editor-container .form-control,
    .footer-editor-container .form-group::after {
        transition: none;
    }

    .footer-editor-container .form-group:hover,
    .footer-editor-container .form-group:focus-within {
        transform: none;
    }
}

/* ==================================================
   12. LOADING STATES
   ================================================== */

/* Loading Overlay */
.footer-editor-container.loading {
    position: relative;
    pointer-events: none;
}

.footer-editor-container.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-editor-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ==================================================
   13. PRINT STYLES
   ================================================== */

@media print {
    #editFooterModal {
        display: none !important;
    }
}
