/**
 * WooCommerce Withdrawal Button Styles
 */

/* Form Container */
.woo-withdrawal-form {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 30px;
    margin: 20px 0;
    max-width: 800px;
}

.woo-withdrawal-form form {
    display: block;
}

/* Sections / Steps */
.woo-withdrawal-step-1,
.woo-withdrawal-step-2,
.woo-withdrawal-step-3 {
    margin: 30px 0 20px 0;
    padding-bottom: 20px;
    border-bottom: 2px solid #ddd;
}

.woo-withdrawal-step-1:first-child {
    margin-top: 0;
}

.woo-withdrawal-step-3:last-child {
    border-bottom: none;
}

/* Step Labels */
.gform_body .gsection_title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

/* Form Fields */
.gform_body .gfield {
    margin-bottom: 20px;
}

.gform_body label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.gform_body input[type="text"],
.gform_body input[type="email"],
.gform_body input[type="number"],
.gform_body select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.gform_body input[type="text"]:focus,
.gform_body input[type="email"]:focus,
.gform_body input[type="number"]:focus,
.gform_body select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Buttons */
.woo-withdrawal-verify-btn {
    background-color: #0073aa;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.woo-withdrawal-verify-btn:hover {
    background-color: #005a87;
}

.woo-withdrawal-verify-btn:active {
    opacity: 0.9;
}

.woo-withdrawal-verify-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gform_body .gform_button {
    background-color: #28a745;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-width: 200px;
}

.gform_body .gform_button:hover {
    background-color: #218838;
}

/* Products List */
.woo-withdrawal-products-container {
    margin: 20px 0;
}

.woo-withdrawal-no-products {
    padding: 20px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    margin: 20px 0;
}

.woo-withdrawal-products-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.woo-withdrawal-product-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.woo-withdrawal-product-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.woo-withdrawal-product-header:hover {
    background-color: #f5f5f5;
}

.woo-withdrawal-product-label {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    cursor: pointer;
    font-weight: 500;
    color: #333;
}

.woo-withdrawal-product-label input[type="checkbox"] {
    cursor: pointer;
    width: 20px;
    height: 20px;
    margin: 0;
}

.woo-withdrawal-product-name {
    font-weight: 600;
    color: #333;
}

.woo-withdrawal-product-sku {
    font-size: 12px;
    color: #666;
    margin-left: 8px;
}

.woo-withdrawal-product-price {
    font-weight: 600;
    color: #0073aa;
    white-space: nowrap;
    margin-left: 20px;
}

/* Product Details (hidden by default) */
.woo-withdrawal-product-details {
    padding: 15px;
    background-color: #f9f9f9;
    border-top: 1px solid #ddd;
    display: none;
}

.woo-withdrawal-product-field {
    margin-bottom: 15px;
}

.woo-withdrawal-product-field:last-child {
    margin-bottom: 0;
}

.woo-withdrawal-product-field label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.woo-withdrawal-quantity-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.woo-withdrawal-quantity-input input {
    width: 80px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.woo-withdrawal-quantity-input input:disabled {
    background-color: #f5f5f5;
    color: #666;
}

.woo-withdrawal-max-qty {
    font-size: 12px;
    color: #666;
}

.woo-withdrawal-product-reason {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.woo-withdrawal-product-reason:disabled {
    background-color: #f5f5f5;
    color: #666;
}

/* Checkboxes */
.gform_body .gfield_checkbox,
.gform_body .gfield_radio {
    margin: 15px 0;
}

.gform_body input[type="checkbox"],
.gform_body input[type="radio"] {
    margin-right: 8px;
    width: auto;
    cursor: pointer;
}

.gform_body label:has(> input[type="checkbox"]),
.gform_body label:has(> input[type="radio"]) {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}

.woo-withdrawal-confirmation {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Notices */
.woo-withdrawal-notice {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    border-left: 4px solid #666;
    animation: slideIn 0.3s ease;
}

.woo-withdrawal-notice-success {
    background-color: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.woo-withdrawal-notice-error {
    background-color: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.woo-withdrawal-notice-info {
    background-color: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Spinner */
.woo-withdrawal-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.woo-withdrawal-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.woo-withdrawal-loader p {
    color: white;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .woo-withdrawal-form {
        padding: 20px;
    }

    .woo-withdrawal-product-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .woo-withdrawal-product-price {
        margin-left: 0;
    }

    .woo-withdrawal-quantity-input {
        flex-direction: column;
        align-items: flex-start;
    }

    .woo-withdrawal-quantity-input input {
        width: 100%;
    }

    .gform_body .gform_button {
        width: 100%;
    }

    .woo-withdrawal-verify-btn {
        width: 100%;
    }
}

/* Accessibility */
.gform_body input:focus-visible,
.gform_body select:focus-visible,
.gform_body button:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .woo-withdrawal-form {
        background: #2a2a2a;
        border-color: #444;
    }

    .gform_body label,
    .woo-withdrawal-product-name {
        color: #e0e0e0;
    }

    .woo-withdrawal-product-item {
        background: #333;
        border-color: #444;
    }

    .woo-withdrawal-product-header:hover {
        background-color: #3a3a3a;
    }

    .woo-withdrawal-product-details {
        background-color: #2a2a2a;
        border-top-color: #444;
    }

    .gform_body input[type="text"],
    .gform_body input[type="email"],
    .gform_body input[type="number"],
    .gform_body select {
        background-color: #3a3a3a;
        color: #e0e0e0;
        border-color: #555;
    }

    .gform_body input:disabled,
    .gform_body select:disabled {
        background-color: #1a1a1a;
    }
}
