/**
 * Headshot Upload Component Styles
 *
 * Styles for the headshot upload with cropping functionality
 */

.headshot-upload {
    width: 100%;
}

/* Drop Zone */
.headshot-dropzone {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: var(--spacing-xl, 2rem);
    background-color: var(--color-background-alt, #f7fafc);
    border: 2px dashed var(--color-border, #e2e8f0);
    border-radius: var(--radius-lg, 0.5rem);
    cursor: pointer;
    transition: all var(--transition-fast, 0.15s);
}

.headshot-dropzone:hover {
    border-color: var(--color-primary, #1a365d);
    background-color: var(--color-background-dark, #edf2f7);
}

.headshot-dropzone:focus {
    outline: 2px solid var(--color-focus, #3182ce);
    outline-offset: 2px;
}

.headshot-dropzone.is-dragover {
    border-color: var(--color-primary, #1a365d);
    background-color: #ebf8ff;
    border-style: solid;
}

.headshot-dropzone-content {
    text-align: center;
}

.headshot-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--spacing-md, 1rem);
    color: var(--color-text-muted, #718096);
}

.headshot-dropzone-text {
    display: block;
    font-size: var(--font-size-base, 1rem);
    color: var(--color-text, #1a202c);
    margin-bottom: var(--spacing-xs, 0.25rem);
}

.headshot-dropzone-hint {
    font-size: var(--font-size-sm, 0.875rem);
    color: var(--color-text-muted, #718096);
}

/* Preview */
.headshot-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md, 1rem);
}

.headshot-preview-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--color-border, #e2e8f0);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.headshot-preview-actions {
    display: flex;
    gap: var(--spacing-sm, 0.5rem);
}

/* Modal */
.headshot-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md, 1rem);
    background-color: rgba(0, 0, 0, 0.75);
}

.headshot-modal-content {
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    background-color: white;
    border-radius: var(--radius-lg, 0.5rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.headshot-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md, 1rem) var(--spacing-lg, 1.5rem);
    border-bottom: 1px solid var(--color-border, #e2e8f0);
}

.headshot-modal-header h3 {
    margin: 0;
    font-size: var(--font-size-lg, 1.125rem);
    color: var(--color-text, #1a202c);
}

.headshot-modal-close {
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--color-text-muted, #718096);
    cursor: pointer;
    border-radius: var(--radius-sm, 0.25rem);
    transition: all var(--transition-fast, 0.15s);
}

.headshot-modal-close:hover {
    background-color: var(--color-background-alt, #f7fafc);
    color: var(--color-text, #1a202c);
}

.headshot-modal-close:focus {
    outline: 2px solid var(--color-focus, #3182ce);
    outline-offset: 2px;
}

.headshot-cropper-container {
    flex: 1;
    min-height: 300px;
    max-height: 50vh;
    overflow: hidden;
    background-color: var(--color-background-dark, #1a202c);
}

.headshot-cropper-image {
    display: block;
    max-width: 100%;
}

.headshot-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm, 0.5rem);
    padding: var(--spacing-md, 1rem) var(--spacing-lg, 1.5rem);
    border-top: 1px solid var(--color-border, #e2e8f0);
}

/* Status and Error Messages */
.headshot-status {
    margin-top: var(--spacing-sm, 0.5rem);
    font-size: var(--font-size-sm, 0.875rem);
    color: var(--color-success, #276749);
    text-align: center;
}

.headshot-error {
    margin-top: var(--spacing-sm, 0.5rem);
    padding: var(--spacing-sm, 0.5rem) var(--spacing-md, 1rem);
    font-size: var(--font-size-sm, 0.875rem);
    color: var(--color-error, #c53030);
    background-color: #fff5f5;
    border-radius: var(--radius-sm, 0.25rem);
    text-align: center;
}

/* Cropper.js Overrides */
.cropper-container {
    /* Ensure cropper fills container */
    width: 100% !important;
}

.cropper-view-box,
.cropper-face {
    border-radius: 50%;
}

.cropper-view-box {
    outline: 2px solid var(--color-primary, #1a365d);
    outline-offset: -2px;
}

.cropper-line {
    background-color: var(--color-primary, #1a365d);
}

.cropper-point {
    background-color: var(--color-primary, #1a365d);
    width: 10px;
    height: 10px;
}

/* Form Integration */
.form-headshot-section {
    padding: var(--spacing-lg, 1.5rem);
    background-color: var(--color-background-alt, #f7fafc);
    border-radius: var(--radius-lg, 0.5rem);
}

.form-headshot-section .form-section-title {
    margin-bottom: var(--spacing-md, 1rem);
}

.form-headshot-section .form-section-description {
    margin-bottom: var(--spacing-lg, 1.5rem);
}

/* Responsive */
@media (max-width: 640px) {
    .headshot-modal-content {
        max-height: 100vh;
        border-radius: 0;
    }

    .headshot-cropper-container {
        min-height: 250px;
    }

    .headshot-preview-image {
        width: 150px;
        height: 150px;
    }

    .headshot-preview-actions {
        flex-direction: column;
        width: 100%;
    }

    .headshot-preview-actions .btn {
        width: 100%;
    }
}
