/* Product Registration Frontend Styles */

.product-registration-form-wrapper {
    max-width: 700px;
    margin: 0 auto;
    padding: 10px 0;
}

.product-registration-form {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-section {
    margin-bottom: 14px;
}

.form-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
}

.form-section:first-child h3 {
    margin-top: 0;
}

.form-group {
    margin-bottom: 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 18px;
}

.form-group label {
    flex: 0 0 190px;
    max-width: 190px;
    font-weight: 600;
    margin-bottom: 0;
    color: #333;
    font-size: 14px;
    text-align: left;
}

/* Textarea rows: keep the label aligned to the top of the field. */
.form-group.form-group--top {
    align-items: flex-start;
}

.form-group .required {
    color: #dc3545;
}

.form-control {
    flex: 1 1 auto;
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.form-control:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
}

textarea.form-control {
    resize: vertical;
    min-height: 64px;
}

/* Turnstile Captcha */
.cf-turnstile {
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    border-top: 1px solid #f0f0f0;
    padding-top: 14px;
}

.button-primary {
    background: #0073aa;
    color: white;
    padding: 10px 26px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.button-primary:hover {
    background: #005a87;
}

.button-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.button-large {
    min-width: 200px;
}

/* Thank-you panel (shown after a successful submission) */
.product-registration-thankyou {
    background: #fff;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.product-registration-thankyou .thankyou-icon {
    width: 56px;
    height: 56px;
    line-height: 56px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #28a745;
    color: #fff;
    font-size: 30px;
}

.product-registration-thankyou h3 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #155724;
}

.product-registration-thankyou .thankyou-message {
    margin: 0 0 18px;
    color: #333;
    font-size: 15px;
}

/* Form Messages */
.form-message {
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
    font-size: 14px;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Loading state */
.form-control:disabled,
.button-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 600px) {
    .product-registration-form {
        padding: 16px 14px;
    }

    /* Stack the label above the input on narrow screens. */
    .form-group {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .form-group label {
        flex-basis: auto;
        max-width: none;
        margin-bottom: 2px;
    }

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

/* Error states */
.form-group input:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.form-group input:valid:not(:placeholder-shown),
.form-group textarea:valid:not(:placeholder-shown) {
    border-color: #28a745;
}
