/* ==========================================================
   Custom Contact Form – ccf-style.css
   Author: Suhan Alam Rana | fiverr.com/ranakpik
   Version: 2.0.0
   ========================================================== */

/* ── Reset & Base ── */
.ccf-wrap *,
.ccf-wrap *::before,
.ccf-wrap *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.ccf-wrap {
    max-width: 580px;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, sans-serif;
    font-size: 15px;
    color: #333;
}

/* ── Response Alert ── */
.ccf-response {
    display: none;
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    animation: ccfFadeIn 0.3s ease;
}

.ccf-response.ccf-success {
    display: block;
    background: #edfaf1;
    border: 1px solid #27ae60;
    border-left: 4px solid #27ae60;
    color: #1a6e3c;
}

.ccf-response.ccf-error {
    display: block;
    background: #fef0ef;
    border: 1px solid #e74c3c;
    border-left: 4px solid #e74c3c;
    color: #a93226;
}

/* ── Form ── */
.ccf-form {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* ── Fields ── */
.ccf-field {
    margin-bottom: 20px;
}

.ccf-field label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #2d3748;
    margin-bottom: 7px;
    letter-spacing: 0.01em;
}

.ccf-required {
    color: #e53e3e;
    margin-left: 2px;
}

/* ── Inputs ── */
.ccf-field input[type="text"],
.ccf-field input[type="email"],
.ccf-field input[type="number"],
.ccf-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #cbd5e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #2d3748;
    background: #f8fafc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.ccf-field input[type="text"]:focus,
.ccf-field input[type="email"]:focus,
.ccf-field input[type="number"]:focus,
.ccf-field textarea:focus {
    border-color: #1a7a6e;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26, 122, 110, 0.12);
}

.ccf-field input.ccf-input-error,
.ccf-field textarea.ccf-input-error,
.ccf-field select.ccf-input-error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.ccf-field textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.6;
}

/* ── Placeholder ── */
.ccf-field input::placeholder,
.ccf-field textarea::placeholder {
    color: #a0aec0;
}

/* ── Select ── */
.ccf-select-wrap {
    position: relative;
}

.ccf-select-wrap select {
    width: 100%;
    padding: 11px 40px 11px 14px;
    border: 1.5px solid #cbd5e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #2d3748;
    background: #f8fafc;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ccf-select-wrap select:focus {
    border-color: #1a7a6e;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26, 122, 110, 0.12);
}

.ccf-select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 11px;
    color: #718096;
}

/* ── Field Errors ── */
.ccf-field-error {
    display: none;
    font-size: 12px;
    color: #e53e3e;
    margin-top: 5px;
    font-weight: 500;
}

.ccf-field-error.visible {
    display: block;
    animation: ccfFadeIn 0.2s ease;
}

/* ── CAPTCHA ── */
.ccf-captcha-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.ccf-captcha-question {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0faf8;
    border: 1.5px solid #b2dfdb;
    border-radius: 6px;
    padding: 10px 16px;
}

.ccf-cap-num {
    font-size: 18px;
    font-weight: 700;
    color: #1a7a6e;
    min-width: 20px;
    text-align: center;
}

.ccf-cap-op {
    font-size: 18px;
    font-weight: 600;
    color: #4a5568;
}

.ccf-cap-mark {
    font-size: 20px;
    font-weight: 800;
    color: #e53e3e;
}

.ccf-captcha-row input[type="number"] {
    width: 90px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

/* ── Submit Button ── */
.ccf-submit-wrap {
    margin-top: 8px;
    margin-bottom: 0;
}

.ccf-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #1a7a6e;
    color: #fff;
    border: none;
    padding: 13px 32px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, opacity 0.2s;
    letter-spacing: 0.02em;
    min-width: 160px;
    font-family: inherit;
}

.ccf-submit-btn:hover:not(:disabled) {
    background: #155f56;
    transform: translateY(-1px);
}

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

.ccf-submit-btn:disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

/* ── Spinner ── */
.ccf-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ccfSpin 0.7s linear infinite;
    flex-shrink: 0;
}

.ccf-submit-btn.ccf-loading .ccf-spinner {
    display: inline-block;
}

.ccf-submit-btn.ccf-loading .ccf-btn-text {
    opacity: 0.85;
}

/* ── Safety Note ── */
.ccf-safety-note {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fffbeb;
    border: 1px solid #f6d860;
    border-left: 4px solid #f0a500;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    color: #5a4a00;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ccf-safety-note a {
    color: #1a7a6e;
    font-weight: 600;
    text-decoration: none;
    word-break: break-all;
}

.ccf-safety-note a:hover {
    text-decoration: underline;
}

.ccf-safety-icon {
    font-size: 16px;
    flex-shrink: 0;
}

/* ── Animations ── */
@keyframes ccfSpin {
    to { transform: rotate(360deg); }
}

@keyframes ccfFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 500px) {
    .ccf-form {
        padding: 22px 18px;
    }

    .ccf-captcha-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .ccf-submit-btn {
        width: 100%;
    }
}
