/**
 * Ortopedicus Forms — Frontend Styles
 * For [orto_form] shortcode rendering
 */

.orto-form-wrap {
    max-width: 640px;
    margin: 0 auto;
    font-family: 'Figtree', system-ui, -apple-system, sans-serif;
}

.orto-form__fields {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.orto-form__field { width: 100%; }
.orto-form__field--full { width: 100%; }
.orto-form__field--half { width: calc(50% - 8px); }
@media (max-width: 600px) { .orto-form__field--half { width: 100%; } }

.orto-form__field--heading {
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
    margin-top: 4px;
}

.orto-form__heading {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

.orto-form__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.orto-form__required { color: #E53935; }

.orto-form__input,
.orto-form__textarea,
.orto-form__select {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    transition: border-color 200ms, box-shadow 200ms;
}

.orto-form__input:focus,
.orto-form__textarea:focus,
.orto-form__select:focus {
    border-color: #005f73;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 95, 115, 0.12);
}

.orto-form__input.is-error,
.orto-form__textarea.is-error,
.orto-form__select.is-error {
    border-color: #E53935;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.orto-form__textarea { resize: vertical; min-height: 80px; }

.orto-form__select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%236B7280' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Radio & Checkbox */
.orto-form__radio-group,
.orto-form__checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.orto-form__radio-label,
.orto-form__checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    padding: 8px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    transition: all 200ms;
}

.orto-form__radio-label:hover,
.orto-form__checkbox-label:hover {
    border-color: #005f73;
    background: #f0fafb;
}

.orto-form__radio-label input,
.orto-form__checkbox-label input {
    accent-color: #005f73;
    width: 16px;
    height: 16px;
}

/* File */
.orto-form__file {
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
    border: 1.5px dashed #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    cursor: pointer;
    transition: border-color 200ms;
}
.orto-form__file:hover { border-color: #005f73; }
.orto-form__file-hint {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
}

/* Rating Stars */
.orto-form__rating {
    display: inline-flex;
    gap: 4px;
}
.orto-form__star {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: #d1d5db;
    transition: color 150ms, transform 150ms;
}
.orto-form__star:hover,
.orto-form__star.is-active {
    color: #f59e0b;
    transform: scale(1.15);
}
.orto-form__star.is-active svg { fill: #f59e0b; }

/* Consent */
.orto-form__consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
    cursor: pointer;
}
.orto-form__consent-label input {
    accent-color: #005f73;
    margin-top: 3px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.orto-form__consent-label a { color: #005f73; text-decoration: underline; }

/* Submit */
.orto-form__footer { margin-top: 24px; }
.orto-form__submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: linear-gradient(135deg, #005f73, #0a9396);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 200ms;
    box-shadow: 0 2px 8px rgba(0, 95, 115, 0.25);
}
.orto-form__submit:hover {
    background: linear-gradient(135deg, #004d5f, #007f82);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 95, 115, 0.3);
}
.orto-form__submit:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}
.orto-form__submit-loading svg {
    animation: orto-form-spin 1s linear infinite;
}
@keyframes orto-form-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Messages */
.orto-form__message {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}
.orto-form__message--success {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}
.orto-form__message--error {
    background: #fef2f2;
    color: #E53935;
    border: 1px solid #fecaca;
}

/* Field error */
.orto-form__field-error {
    font-size: 12px;
    color: #E53935;
    margin-top: 4px;
}
