/**
 * Shared Modal Styles
 * "Look out! Here comes the Spider-Man!"
 */

/* Base modal overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

/* Modal container */
.modal-container {
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
    border: 4px ridge #555;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Modal header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(180deg, #2a2a3e 0%, #1a1a2e 100%);
    border-bottom: 2px groove #444;
}

.modal-header h3 {
    margin: 0;
    color: #ffcc00;
    font-family: 'Arial Black', sans-serif;
    text-transform: uppercase;
    font-size: 14px;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    font-size: 24px;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
}

.modal-close:hover {
    color: #ff6600;
}

/* Modal body */
.modal-body {
    padding: 20px;
}

/* Modal footer */
.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 15px 20px;
    border-top: 2px groove #444;
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
}

/* Photo upload modal specific styles */
.photo-upload-modal .modal-container {
    max-width: 700px;
}

.photo-upload-preview {
    margin-bottom: 20px;
    text-align: center;
    background: #000;
    border: 2px inset #444;
    padding: 10px;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-upload-preview img {
    max-width: 100%;
    max-height: 300px;
    display: block;
}

.photo-upload-preview .preview-placeholder {
    color: #666;
    font-style: italic;
}

/* Form styles within modal */
.modal-body .form-group {
    margin-bottom: 15px;
}

.modal-body .form-group label {
    display: block;
    color: #ffcc00;
    font-family: 'Arial Black', sans-serif;
    text-transform: uppercase;
    margin-bottom: 5px;
    font-size: 11px;
}

.modal-body .form-group input[type="text"],
.modal-body .form-group textarea {
    width: 100%;
    padding: 8px;
    background: #000000;
    border: 2px inset #444;
    color: #00ff66;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.modal-body .form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.modal-body .form-group input:focus,
.modal-body .form-group textarea:focus {
    outline: 2px solid #00ffff;
    border-color: #00ffff;
}

.modal-body .form-hint {
    display: block;
    color: #888;
    font-size: 11px;
    margin-top: 4px;
}

/* Visibility options in modal */
.modal-body .visibility-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-body .visibility-options .radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    color: #cccccc;
}

.modal-body .visibility-options .radio-label strong {
    color: #fff;
}

/* Loading state */
.modal-body.loading {
    opacity: 0.6;
    pointer-events: none;
}

.modal-body .upload-progress {
    text-align: center;
    padding: 20px;
    color: #ffcc00;
    font-family: 'Arial Black', sans-serif;
}

/* 50/50 layout for form fields */
.modal-form-row {
    display: flex;
    gap: 20px;
}

.modal-form-row .form-group {
    flex: 1;
}

/* Confirmation modal */
.confirm-modal .confirm-container {
    max-width: 400px;
}

.confirm-modal .modal-body {
    text-align: center;
    padding: 30px 20px;
}

.confirm-modal .confirm-message {
    margin: 0;
    font-size: 16px;
    color: #e0e0e0;
    line-height: 1.5;
}

.confirm-modal .modal-footer {
    justify-content: center;
    gap: 15px;
}

.confirm-modal .confirm-ok-btn,
.confirm-modal .confirm-cancel-btn {
    min-width: 100px;
}
