/**
 * Helios Member Registration - Frontend Styles
 * Follows theme conventions while providing clean, modern form styling
 */

.helios-member-registration-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 8px;
}

.helios-member-registration-form .form-group {
    margin-bottom: 1.5rem;
}

.helios-member-registration-form .form-group:last-of-type {
    margin-bottom: 0;
}

.helios-member-registration-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
}

.helios-member-registration-form .required {
    color: #dc3545;
    margin-left: 3px;
}

.helios-member-registration-form .optional {
    color: #6c757d;
    font-weight: normal;
    font-size: 0.875rem;
}

.helios-member-registration-form input[type="text"],
.helios-member-registration-form input[type="email"],
.helios-member-registration-form input[type="tel"],
.helios-member-registration-form select,
.helios-member-registration-form textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 1rem;
    line-height: 1.5;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    background-color: #ffffff;
    box-sizing: border-box;
}

.helios-member-registration-form input:focus,
.helios-member-registration-form select:focus,
.helios-member-registration-form textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.helios-member-registration-form select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
}

.helios-member-registration-form textarea {
    resize: vertical;
    min-height: 100px;
}

.helios-member-registration-form .submit-group {
    text-align: center;
    margin-top: 1.65rem;
}

.helios-member-registration-form .submit-btn {
    border: none;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out, transform 0.15s ease-in-out;
}

.helios-member-registration-form .submit-btn:hover {
    background-color: #005a87;
    transform: translateY(-1px);
}

.helios-member-registration-form .submit-btn:active {
    transform: translateY(0);
}

.helios-member-registration-form .submit-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.helios-member-registration-form .registration-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
}

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

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

.helios-member-registration-form .registration-message.processing {
    background-color: #e2f3ff;
    color: #004085;
    border: 1px solid #b8daff;
}

/* Loading spinner for submit button */
.helios-member-registration-form .submit-btn.loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: helios-spin 1s linear infinite;
}

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

/* Form validation styles */
.helios-member-registration-form .form-group.error input,
.helios-member-registration-form .form-group.error select,
.helios-member-registration-form .form-group.error textarea {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.helios-member-registration-form .error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Responsive design */
@media (max-width: 768px) {
    .helios-member-registration-form {
        padding: 0;
    }

    .helios-member-registration-form .submit-btn {
        width: 100%;
        padding: 1rem;
    }
}

/* Contact buttons styling */
.helios-contact-buttons {
    margin-top: 1.5rem;
    text-align: center;
}

/* Contact buttons when inside success message */
.helios-member-registration-form .registration-message .helios-contact-buttons {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(21, 87, 36, 0.2);
}

.helios-contact-btn {
    display: inline-block;
    background-color: #25d366;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    margin: 0.5rem 0.25rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.helios-contact-btn:hover {
    background-color: #128c7e;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.helios-contact-btn:nth-child(2) {
    background-color: #0088cc;
}

.helios-contact-btn:nth-child(2):hover {
    background-color: #006699;
}

.helios-contact-btn:nth-child(3) {
    background-color: #7b68ee;
}

.helios-contact-btn:nth-child(3):hover {
    background-color: #5d4cdb;
}

.helios-contact-btn:nth-child(4) {
    background-color: #ff6b35;
}

.helios-contact-btn:nth-child(4):hover {
    background-color: #e55529;
}

/* Responsive contact buttons */
@media (max-width: 480px) {
    .helios-contact-btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
}

/* WordPress theme compatibility */
.helios-member-registration-form {
    font-family: inherit;
    color: inherit;
    margin-bottom: 30px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .helios-member-registration-form {
        border-color: #000000;
    }

    .helios-member-registration-form input,
    .helios-member-registration-form select,
    .helios-member-registration-form textarea {
        border-color: #000000;
    }

    .helios-member-registration-form .submit-btn {
        background-color: #000000;
        color: #ffffff;
    }
}

/* Horizontal layout styles */
.helios-member-registration-form.layout-horizontal {
    max-width: 100%;
    width: 100%;
}

.helios-member-registration-form.layout-horizontal .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: start;
}

.helios-member-registration-form.layout-horizontal .form-group {
    flex: 1;
    margin-bottom: 0;
    width: 100%;
}

.helios-member-registration-form.layout-horizontal .form-group.submit-group {
    flex: 1;
}

.helios-member-registration-form.layout-horizontal .form-group label {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.helios-member-registration-form.layout-horizontal .submit-btn {
    width: 100%;
    padding: 0.75rem 1rem;
}

/* Responsive horizontal layout */
@media (max-width: 768px) {
    .helios-member-registration-form.layout-horizontal .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .helios-member-registration-form.layout-horizontal .form-group {
        margin-bottom: 0;
    }

    .helios-member-registration-form.layout-horizontal .submit-btn {
        margin-top: 0;
    }
    .helios-member-registration-form .submit-group {
        margin-top: 1rem;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .helios-member-registration-form input,
    .helios-member-registration-form select,
    .helios-member-registration-form textarea,
    .helios-member-registration-form .submit-btn {
        transition: none;
    }

    .helios-member-registration-form .submit-btn:hover {
        transform: none;
    }

    .helios-member-registration-form .submit-btn.loading::after {
        animation: none;
        content: "...";
        width: auto;
        height: auto;
        border: none;
        margin-left: 4px;
    }
} 