/* Elevated Property Management Frontend Styles - CLS Brand Aligned */

/* Main container */
.prop-mag {
    background: #ffffff;
    border-radius: 12px;
    padding: 28px;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.prop-mag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2F4F6F, #4A6B8A, #2F4F6F);
    background-size: 200% 100%;
}

/* Company logo section */
.prop-mag .col-md-4:first-child {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
}

.prop-mag .compy-logo {
    display: block;
    transition: all 0.2s ease;
    border-radius: 0;
    padding: 0;
    background: transparent;
    border: none;
}

.prop-mag .compy-logo:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

.prop-mag .compy-logo img {
    max-height: 40px;
    width: auto;
    object-fit: contain;
    filter: none;
}

/* Contact person section */
.prop-mag .col-md-4:nth-child(2) {
    text-align: center;
    padding: 24px 20px;
    position: relative;
}

.prop-headshot {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 0 auto 18px;
    display: block;
    transition: all 0.2s ease;
}

.prop-headshot:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.prop-mag h3 {
    font-size: 22px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 6px 0;
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.prop-mag .title {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 20px 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* LinkedIn social link */
.prop-mag .lnkedin-social {
    margin: 18px 0 0 0;
    display: block !important;
}

.prop-mag .lnkedin-social a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #0077b5;
    border-radius: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 119, 181, 0.2);
}

.prop-mag .lnkedin-social a:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.3);
    background: #005885;
}

.prop-mag .linked-icon {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Override any conflicting styles */
.prop-mag .lnkedin-social,
.prop-mag .lnkedin-social * {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.prop-mag .lnkedin-social a {
    display: inline-flex !important;
}

/* Contact information section */
.prop-mag .col-md-4:last-child {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact {
    margin: 0 0 14px 0;
}

.contact a {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: #ffffff;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
}

.contact a:hover {
    background: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #111827;
    border-color: #e5e7eb;
}

.contact a i {
    margin-right: 10px;
    font-size: 16px;
    color: #1e40af;
    width: 18px;
    text-align: center;
}

/* vCard and modify button section */
.prop-mag .prop-vcard {
    margin: 22px 0 0 0;
    display: flex;
    flex-direction: row;
    gap: 10px;
    flex-wrap: wrap;
}

.prop-mag .prop-vcard .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: #4ECDC4;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(78, 205, 196, 0.2);
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 1;
    min-width: 120px;
    height: 40px;
}

.prop-mag .prop-vcard .button:hover {
    background: #2F6B7A;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(47, 107, 122, 0.3);
    color: #ffffff;
}

.prop-mag .change-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: #1e40af;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 1;
    min-width: 120px;
    height: 40px;
}

.prop-mag .change-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

/* Modal styles */
.modal {
    backdrop-filter: blur(4px);
    background: rgba(0, 0, 0, 0.4);
}

.modal-dialog {
    max-width: 700px;
    margin: 1.5rem auto;
}

.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #2F4F6F, #4A6B8A);
    color: #ffffff;
    padding: 20px 24px;
    border-bottom: none;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.2px;
}

.btn-close {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    width: 28px;
    height: 28px;
    opacity: 1;
    transition: all 0.2s ease;
    position: relative;
    border: none;
}

.btn-close::before {
    content: '×';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.btn-close:hover::before {
    color: #ffffff;
}

/* Ensure close button is properly styled */
.modal-header .btn-close {
    background: rgba(255, 255, 255, 0.15) !important;
    border: none !important;
    opacity: 1 !important;
}

.modal-header .btn-close::before {
    content: '×' !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.modal-body {
    padding: 28px;
    background: #ffffff;
}

/* Form styles in modal */
#prop-man-form .form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#prop-man-form .form-control {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #ffffff;
}

#prop-man-form .form-control:focus {
    border-color: #1e40af;
    box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.1);
    outline: none;
}

#prop-man-form .btn-primary {
    background: #1e40af;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 140px;
    height: 40px;
}

#prop-man-form .btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

#prop-man-form .btn-outline-primary {
    border: 1px solid #1e40af;
    color: #1e40af;
    background: transparent;
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
}

#prop-man-form .btn-outline-primary:hover {
    background: #1e40af;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.2);
}

#prop-man-form .btn-secondary {
    background: #6b7280;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 140px;
    height: 40px;
}

#prop-man-form .btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

/* Form sections */
.form-section {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f3f4f6;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
    padding-bottom: 6px;
    border-bottom: 2px solid #1e40af;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Form actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
}

/* Image upload sections */
.image-upload-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    color: #64748b;
    font-size: 14px;
}

.image-placeholder i {
    margin-bottom: 8px;
}

/* Placeholder styles for main card */
.compy-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px dashed #d1d5db;
    min-height: 100px;
}

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


/* Image preview in modal */
#headshot-preview,
#company-logo-preview {
    max-width: 120px;
    max-height: 120px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 12px;
}

/* Responsive design */
@media (max-width: 768px) {
    .prop-mag {
        padding: 20px;
        margin: 16px 0;
    }
    
    .prop-mag .row {
        flex-direction: column;
    }
    
    .prop-mag .col-md-4 {
        margin-bottom: 24px;
        text-align: center;
    }
    
    .prop-headshot {
        width: 100px;
        height: 100px;
    }
    
    .prop-mag h3 {
        font-size: 20px;
    }
    
    .prop-mag .prop-vcard {
        flex-direction: column;
    }
    
    .prop-mag .prop-vcard .button,
    .prop-mag .change-btn {
        flex: none;
        min-width: auto;
    }
    
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .prop-mag {
        padding: 16px;
    }
    
    .compy-logo {
        padding: 12px;
    }
    
    .compy-logo img {
        max-height: 60px;
    }
    
    .prop-headshot {
        width: 80px;
        height: 80px;
    }
    
    .prop-mag h3 {
        font-size: 18px;
    }
    
    .contact a {
        padding: 10px 12px;
        font-size: 14px;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.fade-out {
    animation: fadeOut 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Loading states */
.prop-mag.loading {
    opacity: 0.7;
    pointer-events: none;
}

.prop-mag.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #3b82f6;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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