/**
 * WebFizz Orders - Dark Theme with Material UI Styles
 * 
 * Modern dark theme with green accents and Material UI-style inputs
 */

/* ============================================
   DARK THEME BASE
   ============================================ */

.webfizz-dark-theme {
    background: #1a1a1a;
    min-height: 100vh;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #ffffff;
}

.webfizz-checkout-container {
    max-width: 600px;
    margin: 0 auto;
}

.webfizz-checkout-card {
    background: #2d2d2d;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.webfizz-checkout-title {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
    text-align: center;
}

.webfizz-checkout-subtitle {
    font-size: 16px;
    color: #b0b0b0;
    margin: 0 0 32px 0;
    text-align: center;
}

/* ============================================
   MATERIAL UI INPUT STYLES
   ============================================ */

.webfizz-form {
    margin-top: 32px;
}

.webfizz-mui-input-group {
    position: relative;
    margin-bottom: 32px;
}

.webfizz-mui-input,
.webfizz-mui-textarea {
    width: 100%;
    padding: 16px 0 8px 0;
    font-size: 16px;
    color: #ffffff;
    background: transparent;
    border: none;
    border-bottom: 2px solid #404040;
    outline: none;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.webfizz-mui-textarea {
    resize: vertical;
    min-height: 100px;
    padding-top: 24px;
}

.webfizz-mui-input:focus,
.webfizz-mui-textarea:focus {
    border-bottom-color: #00ff00;
}

.webfizz-mui-input:focus + .webfizz-mui-label,
.webfizz-mui-input.webfizz-has-value + .webfizz-mui-label,
.webfizz-mui-textarea:focus + .webfizz-mui-label,
.webfizz-mui-textarea.webfizz-has-value + .webfizz-mui-label,
.webfizz-mui-select:focus + .webfizz-mui-label,
.webfizz-mui-select.webfizz-has-value + .webfizz-mui-label {
    top: -8px;
    font-size: 12px;
    color: #00ff00;
}

.webfizz-mui-label {
    position: absolute;
    left: 0;
    top: 16px;
    font-size: 16px;
    color: #b0b0b0;
    pointer-events: none;
    transition: all 0.3s ease;
    background: #2d2d2d;
    padding: 0 4px;
}

.webfizz-mui-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #00ff00;
    transition: width 0.3s ease;
}

.webfizz-mui-input:focus ~ .webfizz-mui-underline,
.webfizz-mui-textarea:focus ~ .webfizz-mui-underline {
    width: 100%;
}

.webfizz-required {
    color: #ff4444;
}

.webfizz-optional {
    color: #888;
    font-size: 12px;
    font-weight: normal;
}

/* ============================================
   DOMAIN SEARCH VALIDATION
   ============================================ */

.webfizz-domain-search-block {
    margin-bottom: 32px;
}

.webfizz-domain-search-group {
    position: relative;
}

.webfizz-domain-tld-group {
    position: relative;
}

.webfizz-domain-validation-message {
    margin-top: 12px;
    font-size: 12px;
    font-weight: 500;
    transition: color 0.3s ease;
    min-height: 18px;
}

.webfizz-domain-validation-message.webfizz-validation-valid {
    color: #00ff00;
}

.webfizz-domain-validation-message.webfizz-validation-invalid {
    color: #ff4444;
}

/* Update underline color based on validation state for input */
.webfizz-domain-search-group .webfizz-mui-input.webfizz-validation-valid ~ .webfizz-mui-underline {
    background: #00ff00;
}

.webfizz-domain-search-group .webfizz-mui-input.webfizz-validation-invalid ~ .webfizz-mui-underline {
    background: #ff4444;
}

.webfizz-domain-search-group .webfizz-mui-input.webfizz-validation-invalid:focus ~ .webfizz-mui-underline {
    background: #ff4444;
}

/* Update underline color based on validation state for select */
.webfizz-domain-tld-group .webfizz-mui-select.webfizz-validation-valid ~ .webfizz-mui-underline {
    background: #00ff00;
}

.webfizz-domain-tld-group .webfizz-mui-select.webfizz-validation-invalid ~ .webfizz-mui-underline {
    background: #ff4444;
}

.webfizz-domain-tld-group .webfizz-mui-select.webfizz-validation-invalid:focus ~ .webfizz-mui-underline {
    background: #ff4444;
}

/* Material UI Select */
.webfizz-mui-select-group {
    position: relative;
}

.webfizz-mui-select {
    width: 100%;
    padding: 16px 0 8px 0;
    font-size: 16px;
    color: #ffffff;
    background: transparent;
    border: none;
    border-bottom: 2px solid #404040;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300ff00' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 top 50%;
    padding-right: 24px;
    transition: border-color 0.3s ease;
}

.webfizz-mui-select:focus {
    border-bottom-color: #00ff00;
}

.webfizz-mui-select:focus + .webfizz-mui-label,
.webfizz-mui-select.webfizz-has-value + .webfizz-mui-label {
    top: -8px;
    font-size: 12px;
    color: #00ff00;
}

.webfizz-mui-select option {
    background: #2d2d2d;
    color: #ffffff;
    padding: 12px;
}

/* ============================================
   BUTTONS
   ============================================ */

.webfizz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
    width: 100%;
    margin-top: 8px;
}

.webfizz-btn-primary {
    background: #00ff00;
    color: #000000;
}

.webfizz-btn-primary:hover {
    background: #00cc00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.3);
}

.webfizz-btn-large {
    padding: 16px 40px;
    font-size: 18px;
}

.webfizz-btn-payment {
    background: #2d2d2d;
    color: #ffffff;
    border: 2px solid #404040;
    margin-bottom: 12px;
}

.webfizz-btn-payment:hover {
    border-color: #00ff00;
    background: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.2);
}

.webfizz-btn-stripe:hover {
    border-color: #635bff;
}

.webfizz-btn-paypal:hover {
    border-color: #0070ba;
}

.webfizz-btn-whatsapp {
    background: #25D366;
    color: #ffffff;
}

.webfizz-btn-whatsapp:hover {
    background: #128C7E;
}

.webfizz-btn-link {
    color: #00ff00;
    text-decoration: none;
    background: transparent;
    border: none;
    padding: 12px 0;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.3s ease;
    width: auto;
    margin: 0;
}

.webfizz-btn-link:hover {
    color: #00cc00;
    text-decoration: underline;
}

.webfizz-payment-icon {
    width: 24px;
    height: 24px;
}

.webfizz-whatsapp-icon {
    width: 24px;
    height: 24px;
}

/* ============================================
   ORDER SUMMARY
   ============================================ */

.webfizz-order-summary {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 24px;
    margin: 32px 0;
}

.webfizz-summary-title {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #404040;
}

.webfizz-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #2d2d2d;
}

.webfizz-summary-item:last-child {
    border-bottom: none;
}

.webfizz-summary-total {
    margin-top: 12px;
    padding-top: 16px;
    border-top: 2px solid #404040;
}

.webfizz-summary-label {
    color: #b0b0b0;
    font-size: 14px;
}

.webfizz-summary-value {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
}

.webfizz-price {
    color: #00ff00;
    font-size: 18px;
    font-weight: 700;
}

/* ============================================
   PAYMENT METHODS
   ============================================ */

.webfizz-payment-methods {
    margin-top: 32px;
}

.webfizz-methods-title {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 20px 0;
}

.webfizz-payment-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.webfizz-payment-footer {
    margin-top: 24px;
    text-align: center;
}

/* ============================================
   SUCCESS PAGE
   ============================================ */

.webfizz-success-card {
    text-align: center;
}

.webfizz-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: #00ff00;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
}

.webfizz-success-icon svg {
    width: 48px;
    height: 48px;
    stroke-width: 3;
}

.webfizz-whatsapp-section {
    margin: 32px 0;
    padding: 24px;
    background: #1a1a1a;
    border-radius: 8px;
}

.webfizz-whatsapp-text {
    color: #b0b0b0;
    margin: 0 0 16px 0;
    font-size: 14px;
}

/* ============================================
   CANCEL PAGE
   ============================================ */

.webfizz-cancel-card {
    text-align: center;
}

.webfizz-cancel-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: #ff4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.webfizz-cancel-icon svg {
    width: 48px;
    height: 48px;
    stroke-width: 3;
}

.webfizz-retry-section {
    margin: 32px 0;
    padding: 24px;
    background: #1a1a1a;
    border-radius: 8px;
}

.webfizz-retry-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 16px 0;
}

/* ============================================
   ALERTS & MESSAGES
   ============================================ */

.webfizz-alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    border-left: 4px solid;
}

.webfizz-alert-error {
    background: rgba(255, 68, 68, 0.1);
    border-color: #ff4444;
    color: #ff8888;
}

.webfizz-alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border-color: #ffc107;
    color: #ffd54f;
}

.webfizz-alert-success {
    background: rgba(0, 255, 0, 0.1);
    border-color: #00ff00;
    color: #88ff88;
}

/* ============================================
   BADGES
   ============================================ */

.webfizz-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.webfizz-badge-success {
    background: rgba(0, 255, 0, 0.2);
    color: #00ff00;
    border: 1px solid #00ff00;
}

.webfizz-badge-error {
    background: rgba(255, 68, 68, 0.2);
    color: #ff4444;
    border: 1px solid #ff4444;
}

.webfizz-badge-warning {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid #ffc107;
}

/* ============================================
   LOADING SPINNER
   ============================================ */

.webfizz-loading {
    text-align: center;
    padding: 40px 0;
}

.webfizz-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border: 4px solid #404040;
    border-top-color: #00ff00;
    border-radius: 50%;
    animation: webfizz-spin 1s linear infinite;
}

@keyframes webfizz-spin {
    to {
        transform: rotate(360deg);
    }
}

.webfizz-loading p {
    color: #b0b0b0;
    margin: 0;
}

/* ============================================
   FOOTER ACTIONS
   ============================================ */

.webfizz-footer-actions {
    margin-top: 32px;
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #404040;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.d-none {
    display: none !important;
}

/* ============================================
   MANUAL PAYMENT METHODS
   ============================================ */

.webfizz-payment-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid #404040;
}

.webfizz-payment-section:last-child {
    border-bottom: none;
}

.webfizz-payment-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 20px 0;
}

.webfizz-manual-payment-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.webfizz-payment-option {
    background: #1a1a1a;
    border: 2px solid #404040;
    border-radius: 8px;
    padding: 30px;
    transition: all 0.3s ease;
    position: relative;
}

.webfizz-payment-option:hover {
    border-color: #00ff00;
}

.webfizz-payment-option-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.webfizz-payment-radio {
    width: 20px;
    height: 20px;
    display: none;
    cursor: pointer;
    accent-color: #00ff00;
}

.webfizz-payment-option-name {
    flex: 1;
}

.webfizz-payment-instructions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #404040;
}

.webfizz-instructions-box {
    background: #2d2d2d;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    color: #b0b0b0;
    font-size: 14px;
    line-height: 1.6;
}

.webfizz-instructions-box p {
    margin: 0 0 8px 0;
}

.webfizz-instructions-box p:last-child {
    margin-bottom: 0;
}

.webfizz-bank-details,
.webfizz-receiver-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #404040;
}

.webfizz-bank-details p,
.webfizz-receiver-details p {
    margin: 8px 0;
    color: #ffffff;
}

.webfizz-bank-details code {
    background: #1a1a1a;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    color: #00ff00;
}

.webfizz-file-upload-section {
    margin-top: 16px;
}

.webfizz-file-upload-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 8px;
}

.webfizz-file-input {
    width: 100%;
    padding: 12px;
    background: #1a1a1a;
    border: 2px solid #404040;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.webfizz-file-input:hover {
    border-color: #00ff00;
}

.webfizz-file-input:focus {
    outline: none;
    border-color: #00ff00;
}

.webfizz-file-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.webfizz-file-input:not(:disabled) {
    opacity: 1;
    cursor: pointer;
    pointer-events: auto;
}

.webfizz-file-help {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #888;
}

/* ============================================
   FILE INPUT STYLING (Material UI)
   ============================================ */

.webfizz-mui-file-group {
    position: relative;
}

.webfizz-mui-file-input {
    width: 100%;
    padding: 16px 0 8px 0;
    font-size: 16px;
    color: #ffffff;
    background: transparent;
    border: none;
    border-bottom: 2px solid #404040;
    outline: none;
    cursor: pointer;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.webfizz-mui-file-input:hover {
    border-bottom-color: #00ff00;
}

.webfizz-mui-file-input:focus {
    border-bottom-color: #00ff00;
}

.webfizz-mui-file-input:focus + .webfizz-mui-label,
.webfizz-mui-file-input.webfizz-has-value + .webfizz-mui-label {
    top: -8px;
    font-size: 12px;
    color: #00ff00;
}

.webfizz-mui-file-input:focus ~ .webfizz-mui-underline {
    width: 100%;
}

/* File input styling adjustments */
.webfizz-mui-file-input::-webkit-file-upload-button {
    background: #00ff00;
    color: #000000;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    margin-right: 12px;
    font-family: inherit;
}

.webfizz-mui-file-input::-webkit-file-upload-button:hover {
    background: #00cc00;
}

/* Responsive */
@media (max-width: 768px) {
    .webfizz-checkout-card {
        padding: 24px;
    }
    
    .webfizz-checkout-title {
        font-size: 24px;
    }
    
    .webfizz-checkout-subtitle {
        font-size: 14px;
    }
}
