/* Text Selection Icon */
.crew-suggestion-icon {
    position: fixed;
    cursor: pointer;
    z-index: 10000;
    font-size: 24px;
    transition: opacity 120ms ease, transform 0.2s;
    user-select: none;
    opacity: 0;
    pointer-events: none;
    top: -9999px;
    left: -9999px;
}

.crew-suggestion-icon.visible {
    opacity: 1;
    pointer-events: auto;
}

.crew-suggestion-icon:hover {
    transform: scale(1.2);
}

.crew-suggestion-icon:active {
    transform: scale(0.9);
}

/* Suggestion Popup Overlay */
.crew-suggestion-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Suggestion Popup */
.crew-suggestion-popup {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

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

/* Popup Header */
.crew-suggestion-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.crew-suggestion-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.crew-suggestion-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.crew-suggestion-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* Popup Body */
.crew-suggestion-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.crew-suggestion-selected-text {
    margin-bottom: 20px;
}

.crew-suggestion-selected-text label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
}

.crew-suggestion-text-display {
    background: #f8f9fa;
    border-left: 4px solid #0066cc;
    padding: 12px;
    border-radius: 4px;
    font-style: italic;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

.crew-suggestion-form-group {
    margin-bottom: 20px;
}

.crew-suggestion-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
}

.crew-suggestion-input,
.crew-suggestion-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.crew-suggestion-input:focus,
.crew-suggestion-textarea:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.crew-suggestion-textarea {
    resize: vertical;
    min-height: 80px;
}

.crew-input-error {
    border-color: #dc2626 !important;
}

.crew-validation-error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
}

.crew-suggestion-error {
    background: #fee2e2;
    border-left: 4px solid #dc2626;
    padding: 12px;
    border-radius: 4px;
    color: #991b1b;
    font-size: 14px;
    margin-bottom: 16px;
}

.crew-suggestion-success {
    background: #d1fae5;
    border-left: 4px solid #10b981;
    padding: 12px;
    border-radius: 4px;
    color: #065f46;
    font-size: 14px;
    margin-bottom: 16px;
}

/* Popup Footer */
.crew-suggestion-footer {
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.crew-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.crew-btn:active {
    transform: scale(0.98);
}

.crew-btn--primary {
    background: #0066cc;
    color: white;
}

.crew-btn--primary:hover:not(:disabled) {
    background: #0052a3;
}

.crew-btn--primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.crew-btn--secondary {
    background: #f0f0f0;
    color: #333;
}

.crew-btn--secondary:hover {
    background: #e0e0e0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .crew-suggestion-popup {
        width: 95%;
        max-height: 95vh;
    }

    .crew-suggestion-header,
    .crew-suggestion-body,
    .crew-suggestion-footer {
        padding: 16px;
    }

    .crew-selection-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}
