/**
 * CureZeal Reviews Manager — Review Form Styles
 */

/* ── Form wrapper ────────────────────────────────────────────────────────────── */

.cz-review-form-wrap {
    margin-bottom: 24px;
}

/* ── Locked state ────────────────────────────────────────────────────────────── */

.cz-form-locked {
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    padding: 14px 16px;
    background: #fff;
}

.cz-form-locked__header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.cz-form-locked__textarea {
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    font-size: 0.95em;
    color: #999;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.5;
    min-height: 44px;
}

.cz-btn-write-review {
    background: #f5a623;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.cz-btn-write-review:hover {
    background: #e09510;
}

/* ── Expanded form ───────────────────────────────────────────────────────────── */

.cz-form-expanded {
    border: 1.5px solid #c5a8f0;
    border-radius: 12px;
    padding: 16px;
    background: #fff;
}

.cz-form-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── Form fields ─────────────────────────────────────────────────────────────── */

.cz-form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cz-form-label {
    font-size: 0.85em;
    font-weight: 600;
    color: #555;
}

.cz-required {
    color: #e53e3e;
    margin-left: 2px;
}

.cz-form-textarea {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.95em;
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.cz-form-textarea:focus {
    border-color: #c5a8f0;
}

.cz-form-input {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.95em;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.cz-form-input:focus {
    border-color: #c5a8f0;
}

/* ── Star rating ─────────────────────────────────────────────────────────────── */

.cz-form-field--rating {
    gap: 8px;
}

.cz-star-selector {
    display: flex;
    gap: 4px;
}

.cz-star-btn {
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, background 0.15s;
}

.cz-star-btn svg {
    width: 24px;
    height: 24px;
}

.cz-star-btn svg path {
    fill: #d0d0d0;
    transition: fill 0.15s;
}

.cz-star-btn.active svg path,
.cz-star-btn.hover svg path {
    fill: #f5a623 !important;
}

.cz-star-btn.active,
.cz-star-btn.hover {
    border-color: #f5a623;
    background: #fffbf0;
}

/* ── Field errors ────────────────────────────────────────────────────────────── */

.cz-field-error {
    font-size: 0.82em;
    color: #e53e3e;
    display: none;
}

/* ── Form error ──────────────────────────────────────────────────────────────── */

.cz-form-error {
    font-size: 0.9em;
    color: #e53e3e;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 6px;
    padding: 10px 12px;
}

/* ── Success message ─────────────────────────────────────────────────────────── */

.cz-form-success {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.95em;
    color: #276749;
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-radius: 6px;
    padding: 14px 16px;
    font-weight: 500;
}

.cz-success-text {
    flex: 1;
}

.cz-success-close {
    background: none;
    border: none;
    font-size: 1.4em;
    line-height: 1;
    color: #276749;
    cursor: pointer;
    padding: 0 4px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.cz-success-close:hover {
    opacity: 1;
}

/* ── Action buttons ──────────────────────────────────────────────────────────── */

.cz-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 4px;
}

.cz-btn-cancel {
    background: #fff;
    color: #555;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    padding: 9px 20px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    font-family: inherit;
}

.cz-btn-cancel:hover {
    border-color: #aaa;
    color: #333;
}

.cz-btn-submit {
    background: #f5a623;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 24px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.cz-btn-submit:hover {
    background: #e09510;
}

.cz-btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}