/* ============================================================
   RR Product Addons Pro — Frontend Styles
   ============================================================ */

/* ── Wrapper & Group ── */
.rrpa-wrapper {
    margin: 20px 0;
}

.rrpa-group {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}

.rrpa-group-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
}

.rrpa-group-desc {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 14px;
}

/* ── Field Wrap ── */
.rrpa-field {
    margin-bottom: 16px;
}

.rrpa-field.rrpa-hidden {
    display: none !important;
}

.rrpa-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 7px;
}

.rrpa-req {
    color: #ef4444;
    margin-left: 3px;
}

.rrpa-field-hint {
    font-size: 12px;
    color: #94a3b8;
    margin: 5px 0 0;
}

/* ── Input / Select / Textarea ── */
.rrpa-input,
.rrpa-select,
.rrpa-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #1e293b;
    background: #f8fafc;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.rrpa-input:focus,
.rrpa-select:focus,
.rrpa-textarea:focus {
    border-color: #22c55e;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.rrpa-textarea {
    resize: vertical;
    min-height: 90px;
}

/* ── Radio Group ── */
.rrpa-radio-group,
.rrpa-checkboxes-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rrpa-radio-item,
.rrpa-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #334155;
    background: #f8fafc;
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
}

.rrpa-radio-item:hover,
.rrpa-checkbox-item:hover {
    border-color: #22c55e;
    background: #f0fdf4;
}

.rrpa-radio-item.rrpa-selected,
.rrpa-checkbox-item.rrpa-selected {
    border-color: #22c55e;
    background: #f0fdf4;
}

.rrpa-radio-item input[type="radio"],
.rrpa-checkbox-item input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    accent-color: #22c55e;
    flex-shrink: 0;
}

.rrpa-radio-text {
    flex: 1;
}

.rrpa-opt-price {
    margin-left: auto;
    font-size: 13px;
    font-weight: 600;
    color: #16a34a;
    white-space: nowrap;
}

/* ── File Upload ── */
.rrpa-file-drop {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.rrpa-file-drop:hover,
.rrpa-file-drop.rrpa-dragover {
    border-color: #22c55e;
    background: #f0fdf4;
}

.rrpa-file-icon {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
}

.rrpa-file-drop p {
    margin: 4px 0;
    font-size: 14px;
    color: #475569;
}

.rrpa-file-hint {
    font-size: 12px !important;
    color: #94a3b8 !important;
}

.rrpa-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.rrpa-file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.rrpa-prev-item {
    position: relative;
}

.rrpa-prev-item img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    display: block;
}

.rrpa-prev-name {
    font-size: 12px;
    color: #475569;
    padding: 6px 10px;
    background: #f1f5f9;
    border-radius: 6px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.rrpa-prev-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    padding: 0;
}

/* ── Date Picker ── */
.rrpa-datepicker {
    cursor: pointer;
}

/* ── Price Summary ── */
.rrpa-summary {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 16px 0;
}

.rrpa-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 14px;
}

.rrpa-summary-row span:first-child {
    color: #475569;
    font-weight: 500;
}

.rrpa-summary-addons-val {
    font-weight: 700;
    color: #16a34a;
    font-size: 16px;
}

.rrpa-summary-total-val {
    font-weight: 800;
    color: #0f172a;
    font-size: 18px;
}

/* ── Validation ── */
.rrpa-input.rrpa-error,
.rrpa-select.rrpa-error,
.rrpa-textarea.rrpa-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.rrpa-error-msg {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .rrpa-group {
        padding: 14px;
    }
    .rrpa-radio-item,
    .rrpa-checkbox-item {
        padding: 9px 12px;
    }
}