/**
 * Custom Contact Form — Frontend Styles
 *
 * @package CustomContactForm
 */

/* ================================================================== */
/*  Wrapper                                                           */
/* ================================================================== */
.ccf-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.ccf-form-title {
    margin: 0 0 24px;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

/* ================================================================== */
/*  Notices                                                           */
/* ================================================================== */
.ccf-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.5;
}

.ccf-notice--success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.ccf-notice--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.ccf-notice__icon {
    flex-shrink: 0;
    margin-top: 1px;
}

.ccf-notice--success .ccf-notice__icon { color: #059669; }
.ccf-notice--error   .ccf-notice__icon { color: #dc2626; }

.ccf-notice__list {
    margin: 0;
    padding-left: 18px;
}

.ccf-notice__list li + li {
    margin-top: 4px;
}

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

.ccf-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

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

.ccf-input {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    line-height: 1.5;
    color: #1f2937;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
}

.ccf-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.ccf-input::placeholder {
    color: #9ca3af;
}

.ccf-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Invalid state (browser native + JS-driven) */
.ccf-input:user-invalid,
.ccf-input.ccf-invalid {
    border-color: #dc2626;
}

.ccf-input:user-invalid:focus,
.ccf-input.ccf-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

/* ================================================================== */
/*  Submit button                                                     */
/* ================================================================== */
.ccf-field--submit {
    margin-top: 28px;
}

.ccf-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    background: #2563eb;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
    -webkit-appearance: none;
}

.ccf-button:hover {
    background: #1d4ed8;
}

.ccf-button:active {
    transform: scale(0.98);
}

.ccf-button:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* ================================================================== */
/*  Honeypot (screen-reader–only)                                     */
/* ================================================================== */
.ccf-hp {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ================================================================== */
/*  Responsive                                                        */
/* ================================================================== */
@media (max-width: 480px) {
    .ccf-form-wrapper {
        padding: 0 4px;
    }

    .ccf-button {
        width: 100%;
    }
}
