/* WHMCS Order Widget - Main Styles */

/* Reset */
#whmcs-widget,
#whmcs-widget * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Main Container */
#whmcs-widget.whmcs-widget {
    background: #1a1a1a !important;
    color: #ffffff !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    padding: 40px 20px;
    min-height: 500px;
    position: relative;
}

/* Progress Bar */
#whmcs-widget .whmcs-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto 40px;
    background: #2d2d2d;
    padding: 20px 30px;
    border-radius: 12px;
}

#whmcs-widget .whmcs-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

#whmcs-widget .step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 2px solid #404040;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    transition: all 0.3s;
}

#whmcs-widget .step-check {
    display: none;
}

#whmcs-widget .whmcs-progress-step.active .step-circle {
    background: #f97316;
    border-color: #f97316;
}

#whmcs-widget .whmcs-progress-step.completed .step-circle {
    background: #22c55e;
    border-color: #22c55e;
}

#whmcs-widget .whmcs-progress-step.completed .step-num {
    display: none;
}

#whmcs-widget .whmcs-progress-step.completed .step-check {
    display: block;
}

#whmcs-widget .step-text {
    font-size: 12px;
    color: #9ca3af;
}

#whmcs-widget .whmcs-progress-step.active .step-text {
    color: #f97316;
}

#whmcs-widget .step-line {
    width: 50px;
    height: 2px;
    background: #404040;
    margin: 0 15px;
    margin-bottom: 28px;
}

/* Steps */
#whmcs-widget .whmcs-step {
    display: none !important;
}

#whmcs-widget .whmcs-step.active {
    display: block !important;
}

#whmcs-widget .step-content {
    max-width: 600px;
    margin: 0 auto;
}

#whmcs-widget .step-content.center {
    text-align: center;
}

#whmcs-widget h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
    color: #ffffff;
}

#whmcs-widget .subtitle {
    font-size: 16px;
    color: #9ca3af;
    text-align: center;
    margin-bottom: 30px;
}

/* Search Box */
#whmcs-widget .search-box {
    display: flex;
    background: #2d2d2d;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

#whmcs-widget .search-box input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 16px;
    outline: none;
}

#whmcs-widget .search-box input::placeholder {
    color: #9ca3af;
}

#whmcs-widget #whmcs-search-btn {
    padding: 15px 25px;
    background: #f97316;
    color: #ffffff;
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

#whmcs-widget #whmcs-search-btn:hover {
    background: #ea580c;
}

/* TLD Filters */
#whmcs-widget .tld-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

#whmcs-widget .tld-filters > span {
    color: #9ca3af;
    font-size: 14px;
}

#whmcs-widget .tld-item {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #2d2d2d;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

#whmcs-widget .tld-item input {
    accent-color: #f97316;
}

/* Domain Results */
#whmcs-widget .domain-results {
    margin-bottom: 20px;
}

#whmcs-widget .domain-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2d2d2d;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 2px solid transparent;
    transition: all 0.3s;
}

#whmcs-widget .domain-item.selected {
    border-color: #f97316;
    background: rgba(249, 115, 22, 0.1);
}

#whmcs-widget .domain-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

#whmcs-widget .domain-name {
    font-size: 16px;
    font-weight: 500;
}

#whmcs-widget .domain-status {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
}

#whmcs-widget .domain-status.available {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

#whmcs-widget .domain-status.taken {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

#whmcs-widget .domain-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

#whmcs-widget .domain-price {
    font-size: 16px;
    font-weight: 600;
    color: #f97316;
}

#whmcs-widget .select-domain-btn {
    padding: 8px 16px;
    background: #f97316;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

#whmcs-widget .select-domain-btn:hover {
    background: #ea580c;
}

/* Auth Tabs */
#whmcs-widget .auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

#whmcs-widget .auth-tab {
    flex: 1;
    padding: 15px;
    background: #2d2d2d;
    border: 2px solid transparent;
    border-radius: 10px;
    color: #9ca3af;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

#whmcs-widget .auth-tab.active {
    border-color: #f97316;
    color: #ffffff;
}

#whmcs-widget .auth-content {
    display: none !important;
}

#whmcs-widget .auth-content.active {
    display: block !important;
}

/* Forms */
#whmcs-widget .form-group {
    margin-bottom: 20px;
}

#whmcs-widget .form-group label {
    display: block;
    font-size: 14px;
    color: #9ca3af;
    margin-bottom: 8px;
}

#whmcs-widget .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

#whmcs-widget input[type="text"],
#whmcs-widget input[type="email"],
#whmcs-widget input[type="password"],
#whmcs-widget input[type="tel"],
#whmcs-widget select {
    width: 100%;
    padding: 14px 15px;
    background: #2d2d2d;
    border: 1px solid #404040;
    border-radius: 8px;
    color: #ffffff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
}

#whmcs-widget input:focus,
#whmcs-widget select:focus {
    border-color: #f97316;
}

#whmcs-widget select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

#whmcs-widget select option {
    background: #2d2d2d;
    color: #ffffff;
    padding: 10px;
}

#whmcs-widget input::placeholder {
    color: #6b7280;
}

/* Buttons */
#whmcs-widget .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-decoration: none;
}

#whmcs-widget .btn-primary {
    background: #f97316;
    color: #ffffff;
}

#whmcs-widget .btn-primary:hover {
    background: #ea580c;
}

#whmcs-widget .btn-secondary {
    background: #2d2d2d;
    color: #ffffff;
    border: 1px solid #404040;
}

#whmcs-widget .btn-secondary:hover {
    border-color: #9ca3af;
}

#whmcs-widget .btn-full {
    width: 100%;
}

#whmcs-widget .btn-large {
    padding: 18px 36px;
    font-size: 16px;
}

#whmcs-widget .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Step Navigation */
#whmcs-widget .step-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #404040;
}

/* Order Summary */
#whmcs-widget .order-summary {
    background: #2d2d2d;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
}

#whmcs-widget .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
}

#whmcs-widget .summary-row.total {
    border-top: 1px solid #404040;
    margin-top: 10px;
    padding-top: 15px;
    font-weight: 600;
    font-size: 18px;
}

#whmcs-widget .summary-row.total span:last-child {
    color: #f97316;
}

/* Billing Options */
#whmcs-widget .billing-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

#whmcs-widget .billing-card {
    background: #2d2d2d;
    border: 2px solid #404040;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

#whmcs-widget .billing-card input {
    display: none;
}

#whmcs-widget .billing-card.active,
#whmcs-widget .billing-card:has(input:checked) {
    border-color: #f97316;
    background: rgba(249, 115, 22, 0.1);
}

#whmcs-widget .billing-name {
    display: block;
    font-size: 16px;
    margin-bottom: 5px;
}

#whmcs-widget .billing-price {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #f97316;
}

#whmcs-widget .billing-discount {
    display: inline-block;
    background: #22c55e;
    color: #ffffff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
    margin-top: 8px;
}

/* Payment Options */
#whmcs-widget .payment-options {
    display: flex;
    gap: 15px;
}

#whmcs-widget .payment-card {
    flex: 1;
    background: #2d2d2d;
    border: 2px solid #404040;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

#whmcs-widget .payment-card input {
    display: none;
}

#whmcs-widget .payment-card.active,
#whmcs-widget .payment-card:has(input:checked) {
    border-color: #f97316;
    background: rgba(249, 115, 22, 0.1);
}

#whmcs-widget .payment-logo {
    font-size: 18px;
    font-weight: 700;
}

#whmcs-widget .payment-logo.payu {
    color: #a6c307;
}

#whmcs-widget .payment-logo.paypal {
    color: #003087;
}

/* Success */
#whmcs-widget .success-icon {
    width: 80px;
    height: 80px;
    background: rgba(34, 197, 94, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #22c55e;
    margin: 0 auto 30px;
}

#whmcs-widget .order-details {
    background: #2d2d2d;
    border-radius: 10px;
    padding: 20px;
    max-width: 300px;
    margin: 30px auto;
}

#whmcs-widget .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

#whmcs-widget .detail-row span:last-child {
    font-weight: 600;
}

/* Loading */
#whmcs-widget .loading-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 26, 0.9);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

#whmcs-widget .loading-overlay.active {
    display: flex !important;
}

#whmcs-widget .spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #404040;
    border-top-color: #f97316;
    border-radius: 50%;
    animation: whmcs-spin 1s linear infinite;
}

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

/* Messages */
#whmcs-widget #whmcs-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

#whmcs-widget .message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
}

#whmcs-widget .message.success {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid #22c55e;
    color: #22c55e;
}

#whmcs-widget .message.error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #ef4444;
}

/* Logged In State */
#whmcs-widget .logged-in-box {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #2d2d2d;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
}

#whmcs-widget .user-avatar {
    width: 60px;
    height: 60px;
    background: #1a1a1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #f97316;
}

#whmcs-widget .user-info {
    flex: 1;
}

#whmcs-widget .user-name {
    display: block;
    font-size: 18px;
    font-weight: 600;
}

#whmcs-widget .user-email {
    display: block;
    font-size: 14px;
    color: #9ca3af;
}

#whmcs-widget .user-check {
    font-size: 30px;
    color: #22c55e;
}

/* Responsive */
@media (max-width: 768px) {
    #whmcs-widget.whmcs-widget {
        padding: 20px 15px;
    }
    
    #whmcs-widget .whmcs-progress {
        padding: 15px;
    }
    
    #whmcs-widget .step-line {
        width: 20px;
        margin: 0 8px;
    }
    
    #whmcs-widget .step-text {
        font-size: 10px;
    }
    
    #whmcs-widget h2 {
        font-size: 22px;
    }
    
    #whmcs-widget .search-box {
        flex-direction: column;
    }
    
    #whmcs-widget #whmcs-search-btn {
        width: 100%;
    }
    
    #whmcs-widget .form-row {
        grid-template-columns: 1fr;
    }
    
    #whmcs-widget .auth-tabs {
        flex-direction: column;
    }
    
    #whmcs-widget .billing-options {
        grid-template-columns: 1fr;
    }
    
    #whmcs-widget .payment-options {
        flex-direction: column;
    }
    
    #whmcs-widget .domain-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    #whmcs-widget .domain-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    #whmcs-widget .step-nav {
        flex-direction: column-reverse;
        gap: 10px;
    }
    
    #whmcs-widget .step-nav .btn {
        width: 100%;
    }
}
