/* CCP Custom Forms — matches Betheme + Gravity Forms styling */

.ccp-form-wrapper {
    max-width: 100%;
}

.ccp-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 20px;
}

/* Field widths */
.ccp-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 4px;
}

.ccp-field-full  { width: 100%; }
.ccp-field-half  { width: calc(50% - 10px); }
.ccp-field-third { width: calc(33.333% - 14px); }

/* Labels */
.ccp-form label {
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 14px;
    color: #333;
}

.ccp-group-label {
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 14px;
    color: #333;
    display: block;
}

.ccp-sublabel {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    font-weight: 400;
}

.ccp-required {
    color: #fb5455;
}

/* Inputs */
.ccp-form input[type="text"],
.ccp-form input[type="email"],
.ccp-form input[type="tel"],
.ccp-form select,
.ccp-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s;
    margin: 0;
}

.ccp-form input:focus,
.ccp-form select:focus,
.ccp-form textarea:focus {
    outline: none;
    border-color: #0d2244;
    box-shadow: 0 0 0 2px rgba(13, 34, 68, 0.1);
}

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

.ccp-form select {
    appearance: auto;
}

/* Field groups (Name, Address) */
.ccp-field-group {
    width: 100%;
}

.ccp-field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ccp-field-group .ccp-subfield.ccp-field-half {
    width: calc(50% - 6px);
}

.ccp-field-group .ccp-subfield.ccp-field-third {
    width: calc(33.333% - 8px);
}

.ccp-field-group .ccp-subfield.ccp-field-full {
    width: 100%;
}

/* Honeypot — hidden from humans */
.ccp-hp {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
}

/* Submit button */
.ccp-form-footer {
    width: 100%;
    margin-top: 8px;
}

.ccp-submit-btn {
    display: inline-block;
    padding: 12px 36px;
    background: #0d2244;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
    letter-spacing: 0.5px;
}

.ccp-submit-btn:hover {
    background: #1a3a6a;
}

.ccp-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ccp-submit-btn.ccp-loading {
    position: relative;
    color: transparent;
}

.ccp-submit-btn.ccp-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ccp-spin 0.6s linear infinite;
}

@keyframes ccp-spin {
    to { transform: rotate(360deg); }
}

/* Messages */
.ccp-form-messages {
    width: 100%;
}

.ccp-form-messages .ccp-msg {
    padding: 16px 20px;
    border-radius: 5px;
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.ccp-msg-success {
    background: #80B736;
    color: #fff;
}

.ccp-msg-error {
    background: #fb5455;
    color: #fff;
}

/* Validation */
.ccp-form input:invalid.ccp-touched,
.ccp-form select:invalid.ccp-touched {
    border-color: #fb5455;
}

/* Responsive */
@media (max-width: 768px) {
    .ccp-field-half,
    .ccp-field-third {
        width: 100%;
    }
    .ccp-field-group .ccp-subfield.ccp-field-half,
    .ccp-field-group .ccp-subfield.ccp-field-third {
        width: 100%;
    }
}
