/* VOC Contact Form - Frontend Styles */

.voc-contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.voc-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.voc-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.voc-form-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 4px;
}

.voc-required {
    color: #ef4444;
}

.voc-form-input {
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    transition: all 0.2s;
    font-family: inherit;
}

.voc-form-input:focus {
    outline: none;
    border-color: #f7374f;
    box-shadow: 0 0 0 3px rgba(247, 55, 79, 0.1);
}

.voc-form-input::placeholder {
    color: #9ca3af;
}

.voc-form-submit {
    margin-top: 8px;
}

.voc-form-button {
    width: 100%;
    padding: 14px 24px;
    background: #f7374f;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.voc-form-button:hover {
    background: #e02d42;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(247, 55, 79, 0.3);
}

.voc-form-button:active {
    transform: translateY(0);
}

.voc-form-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.voc-form-message {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 12px;
    display: none !important;
}

.voc-form-message.success,
.voc-form-message.error {
    display: block !important;
}

.voc-form-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.voc-form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.voc-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: voc-spin 0.6s linear infinite;
    display: inline-block;
}

@keyframes voc-spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .voc-contact-form {
        max-width: 100%;
    }
    
    .voc-form-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Checkbox Field */
.voc-form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
}

.voc-form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #f7374f;
    cursor: pointer;
    flex-shrink: 0;
}

.voc-form-checkbox .voc-checkbox-text {
    flex: 1;
    display: inline;
}

.voc-form-checkbox .voc-checkbox-text * {
    display: inline;
}

.voc-form-checkbox .voc-checkbox-text a {
    color: #f7374f;
    text-decoration: underline;
    font-weight: 500;
    display: inline;
}

.voc-form-checkbox .voc-checkbox-text a:hover {
    color: #e02d42;
}

.voc-form-checkbox .voc-required {
    color: #ef4444;
    margin-left: 4px;
    display: inline;
}

/* ── Custom Alert Popup ──────────────────────────────────── */

.voc-alert-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.voc-alert-overlay--visible {
    opacity: 1;
}

.voc-alert-overlay--visible .voc-alert-box {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.voc-alert-box {
    background: #fff;
    border-radius: 20px;
    padding: 40px 32px 32px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
    transform: translateY(24px) scale(0.96);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

/* Icon */
.voc-alert-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voc-alert-icon svg {
    width: 52px;
    height: 52px;
    overflow: visible;
}

/* Success */
.voc-alert-icon--success {
    background: #d1fae5;
}

.voc-alert-icon--success .voc-alert-icon__circle {
    stroke: #10b981;
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: voc-circle-draw 0.5s ease forwards 0.1s;
}

.voc-alert-icon--success .voc-alert-icon__check {
    stroke: #10b981;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: voc-check-draw 0.35s ease forwards 0.55s;
}

/* Error */
.voc-alert-icon--error {
    background: #fee2e2;
}

.voc-alert-icon--error .voc-alert-icon__circle {
    stroke: #ef4444;
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: voc-circle-draw 0.5s ease forwards 0.1s;
}

.voc-alert-icon--error .voc-alert-icon__x {
    stroke: #ef4444;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-dasharray: 28;
    stroke-dashoffset: 28;
}

.voc-alert-icon--error .voc-alert-icon__x1 {
    animation: voc-x-draw 0.25s ease forwards 0.5s;
}

.voc-alert-icon--error .voc-alert-icon__x2 {
    animation: voc-x-draw 0.25s ease forwards 0.65s;
}

@keyframes voc-circle-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes voc-check-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes voc-x-draw {
    to { stroke-dashoffset: 0; }
}

/* Title & Text */
.voc-alert-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 10px;
    line-height: 1.3;
}

.voc-alert-text {
    font-size: 15px;
    color: #6b7280;
    margin: 0 0 24px;
    line-height: 1.6;
}

/* Timer bar */
.voc-alert-timer {
    height: 4px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 0 24px;
}

.voc-alert-timer__bar {
    height: 100%;
    background: #10b981;
    border-radius: 4px;
    animation: voc-timer-shrink linear forwards;
    transform-origin: left;
}

@keyframes voc-timer-shrink {
    from { width: 100%; }
    to   { width: 0%; }
}

/* Button */
.voc-alert-btn {
    display: inline-block;
    padding: 12px 40px;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    letter-spacing: 0.3px;
}

.voc-alert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.voc-alert-btn:active {
    transform: translateY(0);
}

.voc-alert-btn--success {
    background: #10b981;
    color: #fff;
}

.voc-alert-btn--error {
    background: #ef4444;
    color: #fff;
}
