/* Merthopia Support Form - CSS Variables */
:root {
    --srf-primary: #0497b9;
    --srf-primary-hover: #037a96;
    --srf-success: #10b981;
    --srf-error: #ef4444;
    --srf-error-bg: #fee2e2;
    --srf-text: #1f2937;
    --srf-text-light: #6b7280;
    --srf-border: #e5e7eb;
    --srf-input-bg: #ffffff;
    --srf-bg: #ffffff;
    --srf-radius: 8px;
    --srf-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --srf-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Container */
/* UI Polish: Hide theme/page titles when the form is present for a cleaner look */
body:has(.srf-container) .entry-title,
body:has(.srf-container) .post-title,
body:has(.srf-container) .page-title {
    display: none !important;
}

.srf-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    font-family: var(--srf-font);
    color: var(--srf-text);
    box-sizing: border-box;
    position: relative;
    /* Context for absolute positioning if needed */
}

.srf-container * {
    box-sizing: border-box;
    outline: none;
}

/* Header */
.srf-header {
    margin-bottom: 24px;
}

.srf-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--srf-text);
    margin: 0;
}

/* User Info */
.srf-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 12px;
    background: #f9fafb;
    border-radius: var(--srf-radius);
    border: 1px solid var(--srf-border);
}

.srf-avatar img {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.srf-user-details {
    display: flex;
    flex-direction: column;
}

.srf-label {
    font-size: 12px;
    color: var(--srf-text-light);
    text-transform: uppercase;
    font-weight: 600;
}

.srf-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--srf-text);
}

/* Form Groups */
.srf-form-group {
    margin-bottom: 20px;
}

.srf-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--srf-text);
}

.srf-form-group input,
.srf-form-group select,
.srf-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--srf-border);
    border-radius: var(--srf-radius);
    font-size: 14px;
    color: var(--srf-text);
    background: var(--srf-input-bg);
    transition: all 0.2s ease;
    font-family: inherit;
}

.srf-form-group input:focus,
.srf-form-group select:focus,
.srf-form-group textarea:focus {
    border-color: var(--srf-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.srf-form-group input.error,
.srf-form-group select.error,
.srf-form-group textarea.error {
    border-color: var(--srf-error);
}

.srf-error-message {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--srf-error);
}

/* File Upload */
.srf-file-upload-wrapper {
    position: relative;
}

.srf-file-upload-wrapper input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.srf-file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border: 2px dashed var(--srf-border);
    border-radius: var(--srf-radius);
    background: #f9fafb;
    transition: all 0.2s;
    text-align: center;
}

.srf-file-upload-wrapper input[type="file"]:hover+.srf-file-label {
    border-color: var(--srf-primary);
    background: #f0fdf4;
    /* Light green tweak or standard light blue */
}

.srf-file-label .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    margin-bottom: 8px;
    color: var(--srf-text-light);
}

.srf-file-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--srf-text);
}

.srf-file-hint {
    font-size: 12px;
    color: var(--srf-text-light);
    margin-top: 4px;
}

.srf-file-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.srf-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--srf-success);
}

/* Submit Button */
.srf-submit-btn {
    width: 100%;
    padding: 12px 24px;
    background: var(--srf-primary);
    color: #fff;
    border: none;
    border-radius: var(--srf-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.srf-submit-btn:hover {
    background: var(--srf-primary-hover);
    transform: translateY(-1px);
}

.srf-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loader */
.srf-btn-loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: srf-spin 0.8s linear infinite;
}

@keyframes srf-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Notification Modal (Universal) */
.srf-notification-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.srf-notification-modal.active {
    opacity: 1;
    visibility: visible;
}

.srf-notification-content {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    text-align: center;
    width: 90%;
    max-width: 480px;
    transform: scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
}

.srf-notification-modal.active .srf-notification-content {
    opacity: 1;
    transform: scale(1);
}

.srf-notification-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

/* Modal Types */
.srf-notification-modal.srf-type-success .srf-notification-icon {
    background: #ecfdf5;
    color: var(--srf-success);
}

.srf-notification-modal.srf-type-error .srf-notification-icon {
    background: #fef2f2;
    color: var(--srf-error);
}

.srf-notification-icon svg {
    width: 32px;
    height: 32px;
}

.srf-notification-content h3 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.srf-notification-text {
    margin: 0 0 32px;
    color: #4b5563;
    font-size: 16px;
    line-height: 1.5;
}

.srf-close-notification-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: var(--srf-primary);
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.srf-close-notification-btn:hover {
    background: var(--srf-primary-hover);
}