/**
 * CCUR Public Styles
 *
 * Clean, modern styles for the frontend registration form.
 * Uses CSS Grid for two-column layout with responsive fallback.
 *
 * @package CCUR
 */

/* =============================================
   Registration Form Container
   ============================================= */

.ccur-registration-wrap {
    max-width: 680px;
    margin: 30px auto;
    font-family: inherit;
}

/* =============================================
   Notices
   ============================================= */

.ccur-notice {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.ccur-notice-success {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.ccur-notice-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.ccur-notice-error ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ccur-notice-error ul li {
    padding: 2px 0;
}

.ccur-notice-error ul li::before {
    content: "• ";
    color: #dc2626;
}

.ccur-notice-info {
    background: #eff6ff;
    border: 1px solid #93c5fd;
    color: #1e40af;
}

/* =============================================
   Form — Two-Column Grid Layout
   ============================================= */

.ccur-registration-form {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 36px 32px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);

    /* Grid layout — 2 equal columns with gap */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 20px;
}

/* =============================================
   Form Fields
   ============================================= */

.ccur-field-wrap {
    margin-bottom: 14px;
}

.ccur-field-wrap label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: #374151;
}

.ccur-required {
    color: #dc2626;
    margin-left: 2px;
}

.ccur-input {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    line-height: 1.5;
    color: #1f2937;
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.ccur-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: #fff;
}

.ccur-input:hover {
    border-color: #9ca3af;
}

.ccur-textarea {
    min-height: 100px;
    resize: vertical;
}

select.ccur-input {
    appearance: auto;
    cursor: pointer;
}

/* =============================================
   Full-Width Items (span both columns)
   ============================================= */

.ccur-field-full,
.ccur-gdpr-wrap,
.ccur-hp-wrap,
.ccur-submit-wrap,
.ccur-login-link {
    grid-column: 1 / -1;
}

/* =============================================
   Checkbox & Radio
   ============================================= */

.ccur-checkbox-label,
.ccur-radio-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: 400;
    font-size: 14px;
    color: #4b5563;
    cursor: pointer;
    line-height: 1.5;
}

.ccur-checkbox-label input[type="checkbox"],
.ccur-radio-label input[type="radio"] {
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: #3b82f6;
}

.ccur-radio-label {
    margin-bottom: 8px;
}

.ccur-field-wrap fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.ccur-field-wrap fieldset legend {
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    margin-bottom: 8px;
}

/* =============================================
   GDPR Section
   ============================================= */

.ccur-gdpr-wrap {
    margin-top: 10px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
}

.ccur-gdpr-wrap a {
    color: #3b82f6;
    text-decoration: underline;
    margin-left: 4px;
}

.ccur-gdpr-wrap a:hover {
    color: #2563eb;
}

/* =============================================
   Honeypot (hidden from real users)
   ============================================= */

.ccur-hp-wrap {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* =============================================
   Submit Button
   ============================================= */

.ccur-submit-wrap {
    margin-top: 10px;
}

.ccur-submit-btn {
    display: block;
    width: 100%;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}

.ccur-submit-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.ccur-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.ccur-submit-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4);
}

/* =============================================
   Login Link (inside form container)
   ============================================= */

.ccur-login-link {
    text-align: center;
    margin-top: 8px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
    color: #6b7280;
}

.ccur-login-link p {
    margin: 0;
}

.ccur-login-link a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.ccur-login-link a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* =============================================
   Conditional Field Visibility
   ============================================= */

.ccur-field-wrap.ccur-conditional-field.ccur-hidden {
    display: none;
}

/* =============================================
   Responsive — Single Column on Mobile
   ============================================= */

@media (max-width: 680px) {
    .ccur-registration-wrap {
        margin: 20px 10px;
    }

    .ccur-registration-form {
        grid-template-columns: 1fr;
        padding: 24px 18px;
        gap: 4px 0;
    }

    .ccur-input {
        padding: 10px 12px;
        font-size: 16px;
        /* Prevent iOS zoom */
    }
}