/* =============================================
   REALTIME VOICE CONTACT FORM PRO — v4.0
   Font: DM Sans + DM Mono
============================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

/* =========================
   WRAP & LAYOUT
========================= */
.rvcf-wrap {
    max-width: 720px;
    margin: 48px auto;
    font-family: 'DM Sans', Arial, sans-serif;
}

.rvcf-header {
    text-align: center;
    margin-bottom: 32px;
}

.rvcf-header-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.rvcf-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}

.rvcf-header p {
    color: #777;
    font-size: 15px;
    margin: 0;
}


/* =========================
   SUCCESS BANNER
========================= */
.rvcf-success-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f0faf2;
    border: 1px solid #b2dfbd;
    border-left: 4px solid #2e7d32;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    animation: rvcf-slide-in 0.3s ease;
}

@keyframes rvcf-slide-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rvcf-success-icon {
    width: 32px;
    height: 32px;
    background: #2e7d32;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.rvcf-success-banner strong {
    display: block;
    color: #1b5e20;
    font-size: 15px;
    font-weight: 600;
}

.rvcf-success-banner span {
    color: #388e3c;
    font-size: 13px;
}


/* =========================
   FORM CARD
========================= */
.rvcf-form {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}


/* =========================
   SECTION LABELS
========================= */
.rvcf-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #c9502a;
    margin: 28px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.rvcf-section-label:first-child {
    margin-top: 0;
}


/* =========================
   GRID & FIELDS
========================= */
.rvcf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.rvcf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rvcf-field label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.rvcf-field .req {
    color: #c9502a;
}

.rvcf-form input[type="text"],
.rvcf-form input[type="email"],
.rvcf-form textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 7px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #1a1a2e;
    background: #fafafa;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    outline: none;
}

.rvcf-form input:focus,
.rvcf-form textarea:focus {
    border-color: #c9502a;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(201, 80, 42, 0.1);
}

.rvcf-form textarea {
    resize: vertical;
    min-height: 100px;
}


/* =========================
   VOICE RECORDER BOX
========================= */
.rvcf-box {
    background: #fafafa;
    border: 1.5px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
}

.recorder-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.rec-btn {
    border: none;
    padding: 9px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s, transform 0.1s;
}

.rec-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.rec-btn:active {
    transform: translateY(0);
}

.btn-record {
    background: #1a1a2e;
    color: #fff;
}

.btn-stop {
    background: #e53935;
    color: #fff;
}

.btn-play {
    background: #fff;
    border: 1.5px solid #ddd;
    color: #333;
}

.btn-clear {
    background: #fff;
    border: 1.5px solid #ddd;
    color: #e53935;
}

.dot {
    width: 8px;
    height: 8px;
    background: #e53935;
    border-radius: 50%;
    display: inline-block;
    animation: rvcf-pulse 1.2s infinite;
}

.btn-record .dot {
    background: #fff;
    animation: none;
}

.btn-record.recording .dot {
    animation: rvcf-pulse 1.2s infinite;
}

@keyframes rvcf-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.8); }
}

.timer {
    font-family: 'DM Mono', monospace;
    font-size: 14px;
    color: #555;
    min-width: 36px;
}

.status-tag {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.status-tag.idle { background: #eee; color: #888; }
.status-tag.rec  { background: #ffebee; color: #e53935; }
.status-tag.done { background: #e8f5e9; color: #2e7d32; }


/* =========================
   WAVEFORM
========================= */
.waveform-wrap {
    display: none;
    height: 44px;
    align-items: flex-end;
    gap: 2px;
    margin-top: 16px;
    padding: 4px 0;
}

.waveform-wrap.visible {
    display: flex;
}

.wave-bar {
    flex: 1;
    height: 4px;
    background: #c9502a;
    border-radius: 2px;
    transition: height 0.08s ease;
}

audio {
    width: 100%;
    margin-top: 14px;
    display: none;
    border-radius: 6px;
}

audio.visible {
    display: block;
}


/* =========================
   IMAGE UPLOAD
========================= */
.upload-zone {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    position: relative;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: #c9502a;
    background: #fff8f6;
}

.upload-zone input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.upload-icon {
    font-size: 30px;
    margin-bottom: 8px;
}

.upload-text {
    font-size: 14px;
    color: #555;
}

.upload-text strong {
    color: #c9502a;
}

.upload-small {
    margin-top: 6px;
    font-size: 12px;
    color: #aaa;
}

.preview-wrap {
    position: relative;
    display: inline-block;
    margin-top: 4px;
}

.preview-wrap img {
    max-width: 200px;
    max-height: 160px;
    border-radius: 8px;
    border: 1.5px solid #eee;
    display: block;
}

.preview-clear {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: #e53935;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.img-name {
    margin-top: 8px;
    font-size: 12px;
    color: #888;
    font-family: 'DM Mono', monospace;
}


/* =========================
   SUBMIT BUTTON
========================= */
.submit-btn {
    width: 100%;
    margin-top: 28px;
    padding: 15px;
    border: none;
    border-radius: 8px;
    background: #c9502a;
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(201, 80, 42, 0.3);
}

.submit-btn:hover {
    background: #b34424;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(201, 80, 42, 0.35);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


/* =========================
   RESPONSIVE
========================= */
@media (max-width: 580px) {
    .rvcf-form {
        padding: 20px 16px;
    }

    .rvcf-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .recorder-controls {
        gap: 8px;
    }

    .rvcf-wrap {
        margin: 20px 12px;
    }
}
