/* ═══ RIVIERA FORMS — Frontend ═══ */

.rf-form {
    font-family: inherit;
    color: #1a1a1a;
}
.rf-form * { box-sizing: border-box; }

/* ─── Fields Layout ─── */
.rf-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.rf-field {
    width: 100%;
}

/* ─── Labels ─── */
.rf-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

/* ─── Required indicator: red left border ─── */
.rf-field.rf-required .rf-input,
.rf-field.rf-required .rf-select,
.rf-field.rf-required .rf-textarea {
    border-left: 3px solid #ef4444;
}

/* ─── Inputs ─── */
.rf-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    font-family: inherit;
    font-weight: 500;
    border: 2px solid #e2e8f0;
    border-radius: var(--rf-radius, 12px);
    background: #fff;
    color: #1e293b;
    transition: all 0.25s ease;
    outline: none;
}
.rf-input:hover {
    border-color: #cbd5e1;
}
.rf-input:focus {
    border-color: var(--rf-color, #6366f1);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.08);
}
.rf-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* ─── Textarea ─── */
.rf-textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.6;
}

/* ─── Select ─── */
.rf-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9' stroke='%2394a3b8' stroke-width='2.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 18px;
    padding-right: 48px;
    cursor: pointer;
}

/* ─── File Upload ─── */
.rf-upload-zone {
    position: relative;
    border: 2px dashed #d1d5db;
    border-radius: var(--rf-radius, 12px);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    background: #fafbfc;
}
.rf-upload-zone:hover {
    border-color: var(--rf-color, #6366f1);
    background: #f8f9ff;
}
.rf-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.rf-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: #475569;
    color: #fff;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    pointer-events: none;
    transition: background 0.2s;
}
.rf-upload-zone:hover .rf-upload-btn {
    background: var(--rf-color, #6366f1);
}
.rf-upload-hint {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 8px;
}

/* ─── File Tags ─── */
.rf-file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.rf-file-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #334155;
    font-weight: 600;
    font-family: inherit;
}
.rf-file-tag button {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 16px;
    cursor: pointer;
    font-weight: 700;
    line-height: 1;
    padding: 0 2px;
    transition: transform 0.15s;
}
.rf-file-tag button:hover {
    transform: scale(1.2);
}

/* ─── Submit Button ─── */
.rf-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px;
    background: var(--rf-color, #6366f1);
    color: #fff;
    border: none;
    border-radius: var(--rf-radius, 12px);
    font-size: 17px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 20px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.rf-submit:hover {
    filter: brightness(0.9);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.rf-submit:active {
    transform: translateY(-1px);
}
.rf-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.rf-submit svg {
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ─── Error ─── */
.rf-error {
    display: none;
    margin-top: 14px;
    padding: 14px 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--rf-radius, 12px);
    color: #dc2626;
    font-size: 14px;
    text-align: center;
    font-weight: 600;
}
.rf-error.show { display: block; }

/* ─── Success ─── */
.rf-success {
    display: none;
    text-align: center;
    padding: 50px 24px;
}
.rf-success.show {
    display: block;
    animation: rfFade 0.5s ease;
}
.rf-success-icon {
    font-size: 64px;
    margin-bottom: 16px;
}
.rf-success h4 {
    font-size: 24px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 10px;
    font-family: inherit;
}
.rf-success p {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 24px;
    line-height: 1.7;
}

/* ─── Animations ─── */
@keyframes rfFade {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes rfSpin {
    to { transform: rotate(360deg); }
}
