/**
 * SENiTy Application Form Styles
 * Styled to match devster_shop theme
 */

.senity-application-form-wrapper {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.senity-form-header {
    margin-bottom: 40px;
}

.senity-form-title {
    font-family: 'Questrial', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 3.6rem;
    line-height: 4.3rem;
    color: #1D2032;
    margin-bottom: 30px;
}

.senity-form-subtitle {
    font-weight: 400;
    font-size: 1.4rem;
    line-height: 2.4rem;
    color: #7D7D7D;
}

/* Messages */
.senity-form-messages {
    margin-bottom: 25px;
    padding: 20px;
    border-radius: 4px;
}

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

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

.senity-success-msg,
.senity-error-msg {
    margin: 0;
    font-size: 1.4rem;
}

/* Fieldsets */
.senity-fieldset {
    border: none;
    padding: 0;
    margin-bottom: 40px;
}

.senity-fieldset legend {
    font-family: 'Questrial', sans-serif;
    font-weight: 400;
    font-size: 2.8rem;
    line-height: 3.4rem;
    color: #1D2032;
    margin-bottom: 40px;
    padding: 0;
    width: 100%;
}

/* Fields - matching checkout form styling */
.senity-field {
    margin-bottom: 25px;
}

.senity-field label {
    display: block;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 170%;
    color: #7D7D7D;
    margin-bottom: 12px;
}

.senity-field input[type="text"],
.senity-field input[type="email"],
.senity-field input[type="url"],
.senity-field textarea,
.senity-field select {
    width: 100%;
    border: 1px solid #E6E6E6;
    border-radius: 4px;
    padding: 10px 20px;
    font-weight: 400;
    font-size: 1.4rem;
    line-height: 2.4rem;
    color: #7D7D7D;
    box-sizing: border-box;
    font-family: inherit;
}

.senity-field select {
    height: 48px;
}

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

.senity-field input:focus,
.senity-field textarea:focus,
.senity-field select:focus {
    outline: none;
    border-color: #1D2032;
}

.senity-field input.senity-error,
.senity-field textarea.senity-error,
.senity-field select.senity-error {
    border-color: #dc3545;
}

/* Radio buttons should NOT change border color on error - only group shows error */
.senity-radio-group input[type="radio"].senity-error {
    border-color: #E6E6E6;
}

/* Checkboxes should NOT change border color on error - only wrapper shows error */
.senity-checkbox-group input[type="checkbox"].senity-error,
.senity-checkbox input[type="checkbox"].senity-error {
    border-color: #E6E6E6;
}

.senity-field-error {
    display: block;
    color: #dc3545;
    font-size: 13px;
    margin-top: 8px;
}

.senity-char-count {
    display: block;
    font-size: 12px;
    color: #7D7D7D;
    margin-top: 5px;
}

/* Radio buttons - matching checkout styling */
.senity-radio-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.senity-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 400;
    font-size: 1.4rem;
    color: #1D2032;
}

.senity-radio input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    padding: 5px;
    border: 1px solid #E6E6E6;
    background-clip: content-box;
    border-radius: 50%;
    margin-right: 10px;
    cursor: pointer;
    flex-shrink: 0;
}

.senity-radio input[type="radio"]:checked {
    background-color: #1D2032;
}

/* Checkbox group for multiple selections */
.senity-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Error state for checkbox/radio groups */
.senity-checkbox-group.has-error,
.senity-radio-group.has-error {
    border-left: 3px solid #dc3545;
    padding-left: 15px;
    margin-left: -15px;
}

/* Error state for individual checkboxes (like consent checkboxes) */
.senity-field.has-checkbox-error {
    border-left: 3px solid #dc3545;
    padding-left: 15px;
    margin-left: -15px;
}

/* Checkboxes - matching checkout styling */
.senity-checkbox {
    display: flex !important;
    align-items: center !important;
    cursor: pointer;
    font-weight: 400;
    font-size: 1.4rem;
    line-height: 2.4rem;
    color: #1D2032;
    margin-bottom: 15px;
}

.senity-checkbox input[type="checkbox"] {
    width: 24px;
    height: 24px;
    border: 1px solid #E6E6E6;
    margin-right: 10px;
    -webkit-appearance: none;
    appearance: none;
    background-color: #fff;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.senity-checkbox input[type="checkbox"]:before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 10px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0);
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em #1D2032;
}

.senity-checkbox input[type="checkbox"]:checked::before {
    transform: translate(-50%, -50%) scale(1);
}

/* Program Info */
.senity-program-info {
    background: #f8f9fa;
    border: 1px solid #E6E6E6;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 40px;
}

.senity-program-info h4 {
    font-family: 'Questrial', sans-serif;
    font-weight: 400;
    font-size: 2rem;
    line-height: 2.4rem;
    color: #1D2032;
    margin-top: 0;
    margin-bottom: 16px;
}

.senity-program-info ul {
    margin: 0;
    padding-left: 20px;
}

.senity-program-info li {
    font-size: 1.4rem;
    line-height: 2.4rem;
    color: #7D7D7D;
    margin-bottom: 5px;
}

/* Form Notice */
.senity-form-notice {
    background: #e7f3ff;
    border-left: 4px solid #2196f3;
    padding: 16px;
    margin-bottom: 25px;
    font-size: 1.4rem;
    line-height: 2.4rem;
    color: #1D2032;
}

/* Submit Button */
.senity-form-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    /*margin-top: 40px;*/
    margin-bottom: 10px;
}

.senity-submit-btn {
    background: #1D2032;
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 1.6rem;
    font-weight: 400;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: inherit;
}

.senity-submit-btn:hover {
    background: #000;
}

.senity-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.senity-loading {
    display: none !important; /* Hide the old loading text */
}

/* Loading State - spinner inside button */
.senity-btn-loading {
    position: relative;
    padding-left: 50px;
}

.senity-btn-spinner {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: senity-btn-spinner-rotate 0.6s linear infinite;
    display: inline-block;
}

@keyframes senity-btn-spinner-rotate {
    0% {
        transform: translateY(-50%) rotate(0deg);
    }
    100% {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* Required indicator */
.required {
    color: #dc3545;
}

.senity-required-note {
    font-size: 13px;
    color: #7D7D7D;
    margin: 0 0 25px 0;
}

/* Honeypot - hidden */
.senity-field.senity-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .senity-form-title {
        font-size: 2.8rem;
        line-height: 3.4rem;
    }

    .senity-fieldset legend {
        font-size: 2rem;
        line-height: 2.4rem;
        margin-bottom: 25px;
    }

    .senity-form-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .senity-submit-btn {
        width: 100%;
    }
}
