/* Subscription System Styles */

/* Upgrade Button */
.upgrade-button {
    position: fixed;
    top: 80px;
    left: 20px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    z-index: 9998;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upgrade-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.5);
}

.upgrade-button.premium-active {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

/* Premium Badge */
.premium-badge {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Locked Features */
.premium-locked {
    position: relative;
    opacity: 0.6;
    pointer-events: all !important;
    cursor: not-allowed !important;
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    border-radius: 10px;
    z-index: 10;
    cursor: pointer;
}

.lock-overlay span {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 8px;
    color: #f39c12;
}

.premium-locked-btn {
    position: relative;
    opacity: 0.7;
    cursor: not-allowed !important;
}

.premium-tag {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: 8px;
}

/* Pallet Limit Indicator */
.pallet-limit-indicator {
    background: rgba(243, 156, 18, 0.2);
    border: 2px solid #f39c12;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 15px;
    text-align: center;
}

.limit-text {
    color: #f39c12;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Upgrade Prompt Toast */
.upgrade-prompt-toast {
    position: fixed;
    top: 100px;
    right: -400px;
    width: 380px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    z-index: 10001;
    transition: right 0.4s ease;
    border: 2px solid #f39c12;
}

.upgrade-prompt-toast.show {
    right: 20px;
}

.prompt-content {
    padding: 20px;
    position: relative;
}

.prompt-icon {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 10px;
}

.prompt-text {
    color: #ecf0f1;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 15px;
    text-align: center;
}

.prompt-upgrade-btn {
    width: 100%;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prompt-upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
}

.prompt-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #95a5a6;
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.prompt-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ecf0f1;
}

/* Subscription Modal */
.subscription-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10002;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    padding: 40px 20px;
}

.subscription-modal.show {
    opacity: 1;
}

.subscription-modal-content {
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border-radius: 20px;
    max-width: 1000px;
    width: 100%;
    margin-bottom: 40px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    animation: slideUpFade 0.4s ease;
}

@keyframes slideUpFade {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.subscription-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #e74c3c;
    font-size: 2rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.subscription-close-btn:hover {
    background: rgba(231, 76, 60, 0.2);
    transform: rotate(90deg);
}

.subscription-header {
    text-align: center;
    padding: 40px 40px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.subscription-header h2 {
    color: #f39c12;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subscription-subtitle {
    color: #bdc3c7;
    font-size: 1.1rem;
}

/* Disclaimer Notice */
.disclaimer-notice {
    background: rgba(231, 76, 60, 0.1);
    border: 2px solid rgba(231, 76, 60, 0.3);
    border-radius: 10px;
    padding: 20px 40px;
    margin: 0 40px 20px;
}

.disclaimer-notice h4 {
    color: #e74c3c;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.disclaimer-notice p {
    color: #ecf0f1;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.disclaimer-notice ul {
    margin: 15px 0 15px 25px;
    color: #bdc3c7;
    font-size: 0.9rem;
}

.disclaimer-notice li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.disclaimer-link {
    text-align: center;
    margin-top: 15px;
}

.disclaimer-link a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.disclaimer-link a:hover {
    color: #2ecc71;
    text-decoration: underline;
}

/* Subscription Agreement */
.subscription-agreement {
    margin: 20px 0;
    padding: 15px;
    background: rgba(241, 196, 15, 0.1);
    border: 2px solid rgba(241, 196, 15, 0.3);
    border-radius: 8px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.agree-checkbox {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #f39c12;
    flex-shrink: 0;
}

.checkbox-label span {
    color: #ecf0f1;
    font-size: 0.9rem;
    line-height: 1.5;
}

.checkbox-label a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.pricing-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 40px;
}

.pricing-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.free-card {
    border-color: rgba(149, 165, 166, 0.3);
}

.premium-card {
    border-color: #f39c12;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.1), rgba(230, 126, 34, 0.1));
}

.recommended-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
}

.pricing-card h3 {
    color: #ecf0f1;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
}

.price {
    text-align: center;
    font-size: 3rem;
    font-weight: 700;
    color: #f39c12;
    margin-bottom: 30px;
}

.price span {
    font-size: 1.2rem;
    color: #95a5a6;
    font-weight: 400;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.features-list li {
    color: #ecf0f1;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
}

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

.btn-subscribe,
.btn-manage,
.btn-current {
    width: 100%;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-subscribe {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

.btn-subscribe:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.5);
}

.btn-subscribe:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #95a5a6;
}

.btn-manage {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-current {
    background: rgba(149, 165, 166, 0.3);
    color: #95a5a6;
    cursor: default;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.subscription-footer {
    text-align: center;
    padding: 30px 40px 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.subscription-footer p {
    color: #bdc3c7;
    margin: 5px 0;
    font-size: 0.9rem;
}

.cancel-anytime {
    color: #95a5a6;
    font-size: 0.85rem !important;
}

/* Manage Subscription */
.manage-content {
    max-width: 600px;
}

.subscription-details {
    padding: 40px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-label {
    color: #95a5a6;
    font-weight: 500;
}

.detail-value {
    color: #ecf0f1;
    font-weight: 600;
}

.status-active {
    color: #2ecc71;
}

.manage-actions {
    padding: 0 40px 30px;
}

.btn-danger {
    width: 100%;
    padding: 12px 30px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
}

.manage-footer {
    text-align: center;
    padding: 20px 40px 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.manage-footer a {
    color: #3498db;
    text-decoration: none;
}

.manage-footer a:hover {
    text-decoration: underline;
}

/* Success Toast */
.success-toast {
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border-radius: 15px;
    padding: 20px 30px;
    box-shadow: 0 10px 40px rgba(46, 204, 113, 0.4);
    z-index: 10003;
    transition: top 0.4s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.success-toast.show {
    top: 30px;
}

.success-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.success-icon {
    font-size: 3rem;
}

.success-text h3 {
    color: white;
    margin: 0 0 5px 0;
    font-size: 1.3rem;
}

.success-text p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: 0.95rem;
}

/* Mobile Landscape */
@media (max-width: 896px) and (max-height: 500px) and (orientation: landscape) {
    .upgrade-button {
        position: static;
        margin: 4px 0 4px 60px;
        padding: 6px 12px;
        font-size: 0.75rem;
        border-radius: 15px;
        display: inline-flex;
    }

    .premium-badge {
        top: 4px;
        right: 50px;
        padding: 4px 10px;
        font-size: 0.7rem;
    }

    .subscription-modal {
        padding: 10px;
    }

    .pricing-container {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        padding: 15px;
    }

    .pricing-card {
        padding: 15px;
    }

    .subscription-header {
        padding: 20px 20px 15px;
    }

    .subscription-header h2 {
        font-size: 1.5rem;
    }

    .upgrade-prompt-toast {
        width: 300px;
    }

    .upgrade-prompt-toast.show {
        right: 10px;
        top: 60px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .upgrade-button {
        top: 70px;
        left: 10px;
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .premium-badge {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .upgrade-prompt-toast {
        width: calc(100% - 40px);
        right: -100%;
    }

    .upgrade-prompt-toast.show {
        right: 20px;
    }

    .subscription-modal {
        padding: 10px;
    }

    .subscription-modal-content {
        border-radius: 15px;
    }

    .subscription-header {
        padding: 30px 20px 20px;
    }

    .subscription-header h2 {
        font-size: 1.8rem;
    }

    .disclaimer-notice {
        padding: 15px 20px;
        margin: 0 20px 20px;
    }
    
    .disclaimer-notice h4 {
        font-size: 1.1rem;
    }
    
    .disclaimer-notice ul {
        margin-left: 20px;
        font-size: 0.85rem;
    }
    
    .subscription-agreement {
        padding: 12px;
    }
    
    .checkbox-label span {
        font-size: 0.85rem;
    }
    
    .pricing-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .pricing-card {
        padding: 20px;
    }

    .price {
        font-size: 2.5rem;
    }

    .subscription-footer {
        padding: 20px;
    }

    .success-toast {
        width: calc(100% - 40px);
        left: 20px;
        transform: none;
    }

    .success-content {
        flex-direction: column;
        text-align: center;
    }
}
