/* Support Modal Styles */
/* Matches CoursHub Dashboard Theme */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    transition: opacity var(--duration-moderate) ease;
}

.modal-overlay.visible {
    opacity: 1;
}

/* Modal Container */
.modal-container {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-glow-lg);
    transform: scale(0.9) translateY(20px);
    transition: transform var(--duration-moderate) ease;
}

.modal-overlay.visible .modal-container {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-6);
    border-bottom: 1px solid var(--color-border-primary);
}

.modal-header h2 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-normal);
    color: var(--color-text-primary);
    margin: 0;
}

.modal-close {
    background: transparent;
    border: 1px solid var(--color-border-primary);
    color: var(--color-text-secondary);
    width: var(--size-button-height);
    height: var(--size-button-height);
    border-radius: var(--radius-base);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-base);
}

.modal-close:hover {
    background: var(--color-hover-bg);
    color: var(--color-text-primary);
    border-color: var(--color-border-hover);
}

/* Modal Body */
.modal-body {
    padding: var(--space-6);
}

.support-intro {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-6);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
}

/* Form Styles */
#support-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-group label {
    color: var(--color-text-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
}

.form-group .required {
    color: var(--color-danger);
}

.form-group input,
.form-group textarea {
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-base);
    padding: var(--space-3);
    color: var(--color-text-primary);
    font-size: var(--font-size-base);
    font-family: var(--font-family-base);
    transition: var(--transition-base);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-bg-secondary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-text-muted);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
    margin-top: var(--space-4);
}

.btn-primary,
.btn-secondary {
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-base);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: var(--transition-base);
    border: none;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.btn-primary {
    background: var(--color-primary);
    color: var(--white-pure);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-primary);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border-primary);
}

.btn-secondary:hover {
    background: var(--color-hover-bg);
    color: var(--color-text-primary);
    border-color: var(--color-border-hover);
}

/* Success/Error Messages */
.support-message {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius-base);
    margin-top: var(--space-4);
}

.support-message svg {
    flex-shrink: 0;
}

.support-message p {
    margin: 0;
    font-size: var(--font-size-base);
    line-height: var(--line-height-snug);
}

.support-message.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: rgb(16, 185, 129);
}

.support-message.success svg {
    stroke: rgb(16, 185, 129);
}

.support-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: rgb(239, 68, 68);
}

.support-message.error svg {
    stroke: rgb(239, 68, 68);
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header,
    .modal-body {
        padding: var(--space-4);
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Additional styles for log attachment */
.form-group label {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    cursor: pointer;
}

.form-group input[type="checkbox"] {
    margin-top: 2px;
    cursor: pointer;
}

.form-help-text {
    margin: var(--space-2) 0 0 0;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    font-style: italic;
}
