/* ═══════════════════════════════════════════════
   Simple License Manager - Styles
   ═══════════════════════════════════════════════ */

.license-buy-container {
    max-width: 500px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    direction: rtl;
}

.license-buy-container h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #1a1a2e;
}

.product-info-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #e8eaf6, #c5cae9);
    border: 2px solid #7986cb;
    border-radius: 10px;
    margin-bottom: 22px;
    text-align: center;
}

.product-info-box .product-icon {
    font-size: 28px;
}

.product-info-box .product-name {
    font-size: 18px;
    font-weight: 700;
    color: #1a237e;
}

.product-info-box .product-price {
    font-size: 14px;
    font-weight: 600;
    color: #283593;
    background: #fff;
    padding: 4px 12px;
    border-radius: 20px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.3s;
    direction: ltr;
    text-align: center;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #4361ee;
    outline: none;
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: #888;
    font-size: 12px;
}

.btn-buy {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    transition: opacity 0.3s;
}

.btn-buy:hover {
    opacity: 0.9;
}

.btn-buy:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.result-box {
    margin-top: 25px;
    padding: 20px;
    background: #e8f5e9;
    border: 2px solid #4caf50;
    border-radius: 10px;
    text-align: center;
}

.result-box h3 {
    margin: 0 0 12px;
    color: #2e7d32;
}

.activation-code,
.slm-code-value {
    font-size: 32px;
    font-weight: 900;
    color: #1b5e20;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    letter-spacing: 4px;
    font-family: Consolas, 'Courier New', 'Lucida Console', monospace !important;
    direction: ltr;
    unicode-bidi: isolate;
    font-variant-numeric: lining-nums tabular-nums;
    font-feature-settings: "lnum" 1;
    margin: 10px 0;
    user-select: all;
    -webkit-user-select: all;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    border: 2px solid #4caf50;
    outline: none;
    cursor: text;
    display: block;
}

.note {
    margin-top: 12px;
    color: #555;
    font-size: 13px;
}

.error-box {
    margin-top: 20px;
    padding: 14px;
    background: #ffebee;
    border: 2px solid #e53935;
    border-radius: 8px;
    color: #c62828;
    text-align: center;
    font-weight: 600;
}

.error-box h3 {
    margin: 0 0 10px;
    color: #b71c1c;
}

.error-box p {
    margin: 8px 0;
    font-weight: 400;
    color: #555;
}

.loading-box {
    margin-top: 20px;
    padding: 30px;
    text-align: center;
    background: #f5f5f5;
    border-radius: 10px;
}

.loading-box p {
    margin-top: 12px;
    color: #555;
    font-weight: 600;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #4361ee;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Duration Options */
.duration-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.duration-option {
    flex: 1;
    min-width: 120px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.duration-option:hover {
    border-color: #7986cb;
}

.duration-option input[type="radio"] {
    display: none;
}

.duration-option input[type="radio"]:checked + .dur-label {
    color: #1a237e;
}

.duration-option:has(input:checked) {
    border-color: #4361ee;
    background: #e8eaf6;
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

.dur-label {
    display: block;
    font-weight: 700;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.dur-price {
    display: block;
    font-size: 13px;
    color: #666;
    direction: ltr;
}

/* Price Summary */
.price-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #e8f5e9;
    border: 2px solid #4caf50;
    border-radius: 10px;
    margin: 15px 0 5px;
    font-size: 16px;
}

.price-summary strong {
    font-size: 20px;
    color: #2e7d32;
}

/* License Details on Success */
.license-details {
    margin: 15px auto;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #c8e6c9;
    max-width: 300px;
}

.license-details div {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #e8f5e9;
}

.license-details div:last-child {
    border-bottom: none;
}

.license-details span {
    color: #555;
}

.license-details strong {
    color: #1b5e20;
}

/* ═══════════════════════════════════════════════
   COMPACT FORM (when both product & duration from URL)
   ═══════════════════════════════════════════════ */

.slm-compact {
    max-width: 420px;
    padding: 30px 28px;
}

.slm-compact-header {
    text-align: center;
    margin-bottom: 22px;
}

.slm-compact-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.slm-compact-header h2 {
    font-size: 18px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0;
    line-height: 1.6;
}

.slm-compact .price-summary {
    margin-top: 10px;
}

.slm-compact .btn-buy {
    margin-top: 6px;
}

@media (max-width: 480px) {
    .slm-compact {
        padding: 24px 20px;
    }
    .slm-compact-header h2 {
        font-size: 16px;
    }
}

/* ═══════════════════════════════════════════════
   SUCCESS PAGE STYLES
   ═══════════════════════════════════════════════ */

.slm-success-page {
    max-width: 560px;
    padding: 40px 35px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.slm-success-header {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 1px dashed #e2e8f0;
    margin-bottom: 24px;
}

.slm-success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 40px;
    font-weight: 900;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.35);
    animation: slm-pop 0.5s ease-out;
}

@keyframes slm-pop {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); }
}

.slm-success-header h2 {
    margin: 0 0 6px;
    font-size: 22px;
    color: #1a1a2e;
    font-weight: 800;
}

.slm-success-subtitle {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.slm-code-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px dashed #4caf50;
    border-radius: 12px;
    padding: 22px 18px;
    text-align: center;
    margin-bottom: 22px;
}

.slm-code-label {
    display: block;
    font-size: 13px;
    color: #2e7d32;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.slm-code-card .activation-code,
.slm-code-card .slm-code-value {
    font-size: 40px;
    letter-spacing: 8px;
    margin: 8px 0 14px;
    padding: 18px;
    background: #fff;
    border: 2px solid #4caf50;
    color: #1b5e20;
}

/* Info Bar - License type & expiry on one line */
.slm-info-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    margin: 18px 0 8px;
    flex-wrap: wrap;
    direction: rtl;
    font-size: 15px;
    color: #312e81;
}

.slm-info-bar strong {
    color: #1e1b4b;
    font-weight: 700;
    margin-left: 4px;
}

.slm-info-bar .slm-divider {
    color: #a5b4fc;
    font-size: 18px;
    font-weight: 300;
}

@media (max-width: 420px) {
    .slm-info-bar {
        gap: 8px;
        font-size: 13px;
        padding: 12px 14px;
    }
    .slm-info-bar .slm-divider {
        display: none;
    }
    .slm-info-bar > span {
        display: block;
        width: 100%;
        text-align: center;
    }
}

.slm-protection-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #fff8e1, #fff3c4);
    border: 1px solid #fbbf24;
    border-radius: 10px;
    margin: 22px 0;
}

.slm-notice-icon {
    font-size: 28px;
    flex-shrink: 0;
    line-height: 1;
}

.slm-notice-text strong {
    display: block;
    color: #92400e;
    font-size: 15px;
    margin-bottom: 4px;
}

.slm-notice-text p {
    margin: 0;
    color: #78350f;
    font-size: 13px;
    line-height: 1.7;
}

.slm-steps {
    background: #f8fafc;
    border-radius: 10px;
    padding: 18px 20px;
    margin-top: 8px;
}

.slm-steps h4 {
    margin: 0 0 14px;
    color: #1e293b;
    font-size: 15px;
}

.slm-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    color: #475569;
    font-size: 14px;
}

.slm-step-num {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .slm-success-page {
        padding: 28px 20px;
        margin: 10px;
    }
    .slm-code-card .activation-code,
    .slm-code-card .slm-code-value {
        font-size: 28px;
        letter-spacing: 5px;
        padding: 14px 10px;
    }
    .slm-success-header h2 {
        font-size: 19px;
    }
}
