/* Servizo Order - Public */
.ojp-services-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin: 24px 0;
}

.ojp-card,
.ojp-order-form-wrap,
.ojp-dashboard,
.ojp-alert,
.ojp-detail-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.04);
}

.ojp-card {
    padding: 24px;
}

.ojp-card-title,
.ojp-dashboard-head h2,
.ojp-detail-card h3,
.ojp-payment-form h4 {
    margin: 0 0 12px;
    line-height: 1.3;
}

.ojp-card-content p,
.ojp-dashboard-head p,
.ojp-rich-text,
.ojp-muted {
    color: #475569;
}

.ojp-meta-row,
.ojp-package-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.ojp-meta-row:last-child,
.ojp-package-item:last-child {
    border-bottom: 0;
}

.ojp-package-list {
    margin: 16px 0;
}

.ojp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 12px;
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    border: 0;
    cursor: pointer;
}

.ojp-button:hover {
    background: #1d4ed8;
    color: #ffffff;
}

.ojp-button-secondary {
    background: #eef2ff;
    color: #1e3a8a;
}

.ojp-button-secondary:hover {
    background: #e0e7ff;
    color: #1e3a8a;
}

.ojp-button-small {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
}

.ojp-order-form-wrap,
.ojp-dashboard {
    padding: 28px;
    margin: 24px 0;
}

.ojp-form-grid,
.ojp-detail-grid,
.ojp-payment-panel {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.ojp-order-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.ojp-order-form input[type="text"],
.ojp-order-form input[type="email"],
.ojp-order-form input[type="number"],
.ojp-order-form input[type="date"],
.ojp-order-form input[type="file"],
.ojp-order-form select,
.ojp-order-form textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    box-sizing: border-box;
    background: #fff;
}

.ojp-order-form textarea {
    resize: vertical;
}

.ojp-field-help {
    display: block;
    color: #64748b;
    margin-top: 8px;
}

.ojp-alert {
    padding: 16px 18px;
    margin: 16px 0;
}

.ojp-alert-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.ojp-alert-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.ojp-table-wrap {
    overflow-x: auto;
}

.ojp-table {
    width: 100%;
    border-collapse: collapse;
}

.ojp-table th,
.ojp-table td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
    white-space: nowrap;
}

.ojp-status,
.ojp-payment-badge {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.ojp-status {
    background: #eff6ff;
    color: #1d4ed8;
}

.ojp-status-completed {
    background: #ecfdf5;
    color: #047857;
}

.ojp-status-cancelled {
    background: #fef2f2;
    color: #b91c1c;
}

.ojp-status-revision,
.ojp-status-waiting_payment {
    background: #fffbeb;
    color: #b45309;
}

.ojp-status-in_progress {
    background: #eff6ff;
    color: #1d4ed8;
}

.ojp-payment-unpaid {
    background: #f8fafc;
    color: #475569;
}

.ojp-payment-waiting_verification {
    background: #fffbeb;
    color: #b45309;
}

.ojp-payment-paid {
    background: #ecfdf5;
    color: #047857;
}

.ojp-payment-rejected {
    background: #fef2f2;
    color: #b91c1c;
}

.ojp-detail-card {
    padding: 24px;
    margin-top: 18px;
}

.ojp-file-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ojp-rich-text {
    line-height: 1.7;
}

.ojp-text-link {
    display: inline-block;
    margin-top: 8px;
    text-decoration: none;
}

.ojp-payment-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px;
}

.ojp-payment-form {
    margin-top: 18px;
    padding: 22px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: #f8fafc;
}

@media (max-width: 640px) {
    .ojp-order-form-wrap,
    .ojp-dashboard,
    .ojp-card,
    .ojp-detail-card {
        padding: 18px;
    }
}

.ojp-catalog-head,
.ojp-catalog-actions,
.ojp-cart-actions,
.ojp-payment-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.ojp-inline-form {
    margin-top: 18px;
    display: grid;
    gap: 10px;
}

.ojp-field-label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.ojp-inline-form select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    box-sizing: border-box;
    background: #fff;
}

.ojp-button-secondary {
    background: #eef2ff;
    color: #1e3a8a;
}

.ojp-button-secondary:hover {
    background: #dbeafe;
    color: #1e3a8a;
}

.ojp-detail-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-bottom: 24px;
}

.ojp-detail-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.04);
    padding: 24px;
    margin-bottom: 24px;
}

.ojp-payment-panel {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.ojp-payment-box {
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #f8fafc;
}

.ojp-payment-badge {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    background: #eff6ff;
    color: #1d4ed8;
}

.ojp-payment-paid {
    background: #ecfdf5;
    color: #047857;
}

.ojp-payment-pending,
.ojp-payment-unpaid {
    background: #fffbeb;
    color: #b45309;
}

.ojp-payment-failed,
.ojp-payment-cancelled,
.ojp-payment-expired {
    background: #fef2f2;
    color: #b91c1c;
}

.ojp-file-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ojp-rich-text {
    white-space: pre-line;
    color: #334155;
}

.ojp-text-link {
    color: #1d4ed8;
    text-decoration: none;
}

.ojp-text-link:hover {
    text-decoration: underline;
}

.ojp-muted {
    color: #64748b;
}

.ojp-qty-input {
    max-width: 84px;
}

.ojp-checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ojp-cart-summary {
    margin: 20px 0;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #f8fafc;
}

.ojp-brief-form {
    margin-top: 18px;
}


.ojp-auth-open {
    overflow: hidden;
}

.ojp-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.ojp-auth-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.56);
}

.ojp-auth-modal__dialog {
    position: relative;
    z-index: 2;
    width: min(92vw, 420px);
    margin: 8vh auto 0;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
    padding: 28px;
}

.ojp-auth-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: #f1f5f9;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.ojp-auth-form p {
    margin: 0 0 14px;
}

.ojp-auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.ojp-auth-form input[type="text"],
.ojp-auth-form input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    box-sizing: border-box;
}

.ojp-auth-submit {
    width: 100%;
    margin-top: 8px;
}

.ojp-checkbox-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 6px 0 12px;
}

.ojp-auth-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 14px;
}

.ojp-auth-feedback {
    margin: 14px 0;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
}

.ojp-auth-feedback.is-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.ojp-auth-feedback.is-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.ojp-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 14px;
    color: #64748b;
}

.ojp-auth-divider::before,
.ojp-auth-divider::after {
    content: '';
    height: 1px;
    flex: 1;
    background: #e2e8f0;
}

.ojp-google-login-wrap {
    display: flex;
    justify-content: center;
}

.ojp-inline-form .ojp-open-login-modal {
    width: 100%;
}
