﻿/* ==================================================
   COMPANY INFORMATION MODAL STYLES - Cover Page Specific
   ==================================================

   This file contains SPECIFIC styles for the Company Information Modal
   (#infoModal) used on the cover page. It inherits base modal styles from
   ../shared/modals.css and adds Company Info specific functionality.

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

   Features:
   - Clean company information form
   - Icon-based field layout
   - Hover and focus states
   - Form validation styling
   - Professional appearance matching brand

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

/* ==================================================
   1. COMPANY INFO MODAL Z-INDEX (Required for proper layering)
   ================================================== */

/* Modal dialog sizing */
#infoModal .modal-dialog {
    max-width: 500px;
}

#cropModal .modal-dialog {
    max-width: 480px;
}

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

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

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

/* ==================================================
   2. COMPANY MODAL LAYOUT & STRUCTURE
   ================================================== */

/* Company Modal Content */
.company-modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.12), 0 8px 32px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    backdrop-filter: blur(10px);
    height: auto;
}

/* Company Modal Header */
.company-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    position: relative;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.company-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    z-index: 1;
}

.company-modal-header .header-content {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 2;
}

.company-modal-header .header-icon {
    font-size: 24px;
    opacity: 0.9;
    color: white;
}

.company-modal-header .header-text {
    flex: 1;
}

.company-modal-header .title-main {
    display: block;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
    color: white;
}

.company-modal-header .title-subtitle {
    display: block;
    font-size: 14px;
    opacity: 0.8;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
}

/* Company Modal Header Close Button */
.company-modal-header .close {
    position: relative;
    z-index: 2;
    color: white;
    font-size: 24px;
    font-weight: bold;
    opacity: 0.8;
    text-shadow: none;
    transition: opacity 0.2s ease;
}

.company-modal-header .close:hover {
    color: white;
    opacity: 1;
}

/* ==================================================
   3. COMPANY MODAL BODY
   ================================================== */

/* Company Modal Body */
.company-modal-body {
    padding: 12px 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    height: auto;
    min-height: 300px;
}

/* ==================================================
   4. COMPANY FORM FIELDS
   ================================================== */

/* Company Field Container */
.company-field {
    margin-bottom: 10px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    align-items: stretch;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.company-field:last-child {
    margin-bottom: 0;
}

.company-field:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

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

/* ==================================================
   5. FIELD ICON STYLING
   ================================================== */

/* Field Icon Container */
.field-icon {
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border-right: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.company-field:hover .field-icon,
.company-field:focus-within .field-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-right-color: #667eea;
}

/* Field Icon */
.field-icon i {
    font-size: 16px;
    color: #6b7280;
    transition: all 0.3s ease;
}

.company-field:hover .field-icon i,
.company-field:focus-within .field-icon i {
    color: white;
}

/* ==================================================
   6. FIELD CONTENT STYLING
   ================================================== */

/* Field Content Container */
.field-content {
    flex: 1;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Company Label */
.company-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.company-field:focus-within .company-label {
    color: #667eea;
}

/* Company Input Field */
.company-input {
    width: 100%;
    border: 1px solid #e5e7eb;
    outline: none;
    font-size: 14px;
    color: #374151;
    background: #ffffff;
    border-radius: 6px;
    padding: 8px 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.company-input:focus {
    color: #1f2937;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.company-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* ==================================================
   7. COMPANY MODAL FOOTER
   ================================================== */

/* Company Modal Footer */
.company-modal-footer {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    padding: 18px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
    border-radius: 0 0 20px 20px;
}

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

.company-modal-footer .btn:hover {
    transform: translateY(-2px) scale(1.05);
}

/* Primary Button (Save) */
.company-modal-footer .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.company-modal-footer .btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

/* Secondary Button (Cancel) */
.company-modal-footer .btn-secondary {
    background: #6b7280;
    color: white;
}

.company-modal-footer .btn-secondary:hover {
    background: #5a5d63;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 24px rgba(107, 114, 128, 0.4);
}

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

/* Valid Field State */
.company-field.valid {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.company-field.valid .field-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-right-color: #10b981;
}

.company-field.valid .field-icon i {
    color: white;
}

.company-field.valid .company-label {
    color: #10b981;
}

/* Invalid Field State */
.company-field.invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.company-field.invalid .field-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-right-color: #ef4444;
}

.company-field.invalid .field-icon i {
    color: white;
}

.company-field.invalid .company-label {
    color: #ef4444;
}

/* ==================================================
   9. LOADING STATES
   ================================================== */

/* Loading Overlay */
.company-modal-body.loading {
    position: relative;
    pointer-events: none;
}

.company-modal-body.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

/* Tablet responsiveness */
@media (max-width: 768px) {
    .company-modal-header {
        padding: 12px 16px;
    }

    .company-modal-header .header-content {
        gap: 12px;
    }

    .company-modal-header .header-icon {
        font-size: 20px;
    }

    .company-modal-header .title-main {
        font-size: 18px;
    }

    .company-modal-header .title-subtitle {
        font-size: 13px;
    }

    .company-modal-body {
        padding: 16px;
    }

    .company-field {
        margin-bottom: 12px;
    }

    .field-content {
        padding: 10px 14px;
    }

    .company-modal-footer {
        padding: 16px 20px;
        gap: 10px;
    }

    .company-modal-footer .btn {
        padding: 12px 18px;
        font-size: 14px;
    }
}

/* Mobile responsiveness */
@media (max-width: 576px) {
    .company-modal-header {
        padding: 10px 14px;
    }

    .company-modal-header .header-content {
        gap: 8px;
    }

    .company-modal-header .header-icon {
        font-size: 18px;
    }

    .company-modal-header .title-main {
        font-size: 16px;
    }

    .company-modal-header .title-subtitle {
        font-size: 12px;
    }

    .company-modal-body {
        padding: 12px;
        min-height: 250px;
    }

    .company-field {
        margin-bottom: 8px;
        flex-direction: column;
    }

    .field-icon {
        width: 100%;
        height: 40px;
        border-right: none;
        border-bottom: 2px solid #e5e7eb;
        border-radius: 12px 12px 0 0;
    }

    .field-content {
        padding: 8px 12px;
    }

    .company-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .company-modal-footer {
        padding: 12px 16px;
        flex-direction: column-reverse;
        gap: 8px;
    }

    .company-modal-footer .btn {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
    }
}

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

/* Enhanced focus states for accessibility */
.company-input:focus,
.company-modal-footer .btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    .company-field {
        border-width: 2px;
    }

    .company-field:hover,
    .company-field:focus-within {
        border-width: 3px;
    }

    .company-input {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .company-field,
    .company-input,
    .company-modal-footer .btn,
    .field-icon,
    .field-icon i {
        transition: none;
        animation: none;
    }

    .company-field:hover,
    .company-modal-footer .btn:hover {
        transform: none;
    }

    .loading-spinner {
        animation: none;
    }
}

/* ==================================================
   12. PRINT STYLES
   ================================================== */

@media print {
    .company-modal-header,
    .company-modal-footer {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }

    .company-field {
        border: 1px solid #000 !important;
        box-shadow: none !important;
        break-inside: avoid;
    }

    .field-icon {
        background: white !important;
        border-right: 1px solid #000 !important;
    }

    .field-icon i {
        color: black !important;
    }
}
