/* ═══════════════════════════════════════════════════════
   CB License Manager - Hosting Order Form (Frontend)
   ═══════════════════════════════════════════════════════ */

.cblm-order-form-wrap {
    max-width: 700px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cblm-order-form {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* ─── Sections ─── */
.cblm-form-section {
    padding: 30px;
    border-bottom: 1px solid #e5e7eb;
}

.cblm-form-section:last-child {
    border-bottom: none;
}

.cblm-form-section h3 {
    margin: 0 0 20px 0;
    font-size: 1.2em;
    color: #1e293b;
}

/* ─── Package Cards ─── */
.cblm-package-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.cblm-package-card {
    display: block;
    cursor: pointer;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 0;
    transition: all 0.2s ease;
    background: #fff;
    overflow: hidden;
}

.cblm-package-card:hover {
    border-color: #818cf8;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12);
    transform: translateY(-2px);
}

.cblm-package-card input[type="radio"] {
    display: none;
}

.cblm-package-card:has(input:checked) {
    border-color: #6366f1;
    background: #fafafe;
    box-shadow: 0 0 0 1px #6366f1, 0 4px 16px rgba(99, 102, 241, 0.15);
}

.cblm-package-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ─── Package Header ─── */
.cblm-package-header {
    padding: 20px 20px 0 20px;
    text-align: center;
}

.cblm-package-name {
    display: block;
    font-size: 1.2em;
    color: #1e293b;
    margin-bottom: 4px;
}

.cblm-package-desc {
    display: block;
    color: #64748b;
    font-size: 0.88em;
    line-height: 1.3;
}

/* ─── Package Pricing ─── */
.cblm-package-pricing {
    padding: 16px 20px;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
}

.cblm-package-price-amount {
    font-size: 2em;
    font-weight: 700;
    color: #4338ca;
    letter-spacing: -0.02em;
}

.cblm-package-price-period {
    font-size: 0.9em;
    color: #64748b;
    font-weight: 400;
}

/* ─── Package Features ─── */
.cblm-package-features {
    list-style: none;
    margin: 0;
    padding: 16px 20px 20px 20px;
    flex: 1;
}

.cblm-package-features li {
    padding: 6px 0;
    font-size: 0.92em;
    color: #334155;
    border-bottom: 1px solid #f8fafc;
    line-height: 1.4;
}

.cblm-package-features li:last-child {
    border-bottom: none;
}

@media (max-width: 600px) {
    .cblm-package-cards {
        grid-template-columns: 1fr;
    }
}

/* ─── Form Rows ─── */
.cblm-form-row {
    margin-bottom: 16px;
}

.cblm-form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #374151;
    font-size: 0.95em;
}

.cblm-form-row input[type="text"],
.cblm-form-row input[type="email"],
.cblm-form-row input[type="tel"],
.cblm-form-row select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.cblm-form-row input:focus,
.cblm-form-row select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.cblm-form-row small {
    display: block;
    margin-top: 4px;
    color: #9ca3af;
    font-size: 0.85em;
}

.cblm-form-row .required {
    color: #dc2626;
}

.cblm-form-row-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .cblm-form-row-half {
        grid-template-columns: 1fr;
    }
}

/* ─── Cycle Price ─── */
.cblm-cycle-price {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 12px;
    background: #eef2ff;
    color: #4338ca;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95em;
}

/* ─── Order Summary ─── */
.cblm-order-summary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.cblm-order-summary h3 {
    margin: 0 0 10px 0;
    font-size: 1em;
}

#cblm-summary-content {
    font-size: 0.95em;
    color: #475569;
    line-height: 1.6;
}

#cblm-summary-content strong {
    color: #1e293b;
}

/* ─── Checkbox ─── */
.cblm-checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 20px;
    font-weight: normal !important;
}

.cblm-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
}

.cblm-checkbox-label a {
    color: #6366f1;
}

/* ─── Submit Button ─── */
.cblm-order-submit {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cblm-order-submit:hover {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.cblm-order-submit:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ─── Messages ─── */
.cblm-order-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.95em;
}

.cblm-order-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.cblm-order-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ─── Success Page ─── */
.cblm-order-success {
    max-width: 600px;
    margin: 40px auto;
    padding: 40px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 12px;
    text-align: center;
}

.cblm-order-success h3 {
    color: #166534;
    font-size: 1.4em;
    margin: 0 0 10px 0;
}

.cblm-order-success p {
    color: #15803d;
    margin: 0;
}

/* ─── Notice ─── */
.cblm-order-notice {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
    background: #fffbeb;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    text-align: center;
    color: #92400e;
}

/* ─── Coupon Code ─── */
.cblm-coupon-wrap {
    display: flex;
    gap: 8px;
}

.cblm-coupon-wrap input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.cblm-coupon-wrap input[type="text"]:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.cblm-coupon-wrap input.cblm-coupon-locked {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}

.cblm-coupon-apply {
    padding: 10px 20px;
    background: #f8fafc;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.cblm-coupon-apply:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.cblm-coupon-apply.cblm-coupon-remove-mode {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fca5a5;
}

.cblm-coupon-apply.cblm-coupon-remove-mode:hover {
    background: #fee2e2;
}

.cblm-coupon-message {
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.88em;
    font-weight: 500;
}

.cblm-coupon-success {
    background: #dcfce7;
    color: #166534;
}

.cblm-coupon-error {
    background: #fef2f2;
    color: #991b1b;
}

/* ─── Discount Pricing ─── */
.cblm-price-original {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 0.7em;
    font-weight: 400;
}

.cblm-price-discount {
    color: #16a34a;
    font-weight: 700;
}

.cblm-coupon-applied-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 3px 10px;
    background: #dcfce7;
    color: #166534;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}
