/* Main Container */
.wc-direct-checkout-wrapper {
    margin: 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.wc-direct-checkout-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.wc-direct-checkout-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shine 6s infinite;
}

@keyframes shine {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Title */
.wc-direct-checkout-title {
    color: #ffffff;
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 25px 0;
    text-align: center;
    letter-spacing: -0.5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
}

.wc-direct-checkout-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: #ffd700;
    margin: 10px auto 0;
    border-radius: 3px;
}

/* Vertical Offers Section */
.wc-direct-offers-vertical {
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.wc-direct-offers-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 15px;
    text-align: left;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

.wc-direct-offer-card-vertical {
    margin-bottom: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.wc-direct-offer-card-vertical input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.wc-direct-offer-label-vertical {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 18px 22px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.wc-direct-offer-label-vertical::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #ffd700, #ffb347);
    transform: scaleY(0);
    transition: transform 0.3s ease;
    transform-origin: top;
}

.wc-direct-offer-card-vertical.selected .wc-direct-offer-label-vertical {
    border-color: #ffd700;
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.25);
    background: #ffffff;
}

.wc-direct-offer-card-vertical.selected .wc-direct-offer-label-vertical::before {
    transform: scaleY(1);
}

.wc-direct-offer-card-vertical:hover .wc-direct-offer-label-vertical {
    transform: translateX(3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.5);
}

/* Offer Left Side */
.offer-left {
    display: flex;
    flex-direction: column;
}

.offer-left .offer-name {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.offer-left .offer-description {
    font-size: 14px;
    color: #666;
}

/* Offer Right Side */
.offer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.offer-price-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-bottom: 2px;
}

.offer-old-price {
    font-size: 16px;
    color: #888;
    text-decoration: line-through;
    text-decoration-color: #c0c0c0;
    text-decoration-thickness: 1.5px;
    margin-bottom: 2px;
    font-weight: 300;
    font-style: italic;
}

.offer-price {
    font-size: 24px;
    font-weight: 800;
    color: #764ba2;
    line-height: 1.2;
}

.offer-quantity {
    font-size: 14px;
    color: #888;
    font-weight: 500;
    background: rgba(118, 75, 162, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
}

/* Selected state colors */
.wc-direct-offer-card-vertical.selected .offer-price {
    color: #ffd700;
    text-shadow: 0 2px 5px rgba(255, 215, 0, 0.2);
}

.wc-direct-offer-card-vertical.selected .offer-old-price {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: line-through;
    text-decoration-color: rgba(233, 59, 82, 0.712);
    text-decoration-thickness: 1.5px;
}

.wc-direct-offer-card-vertical.selected .offer-quantity {
    background: rgba(255, 215, 0, 0.15);
    color: #764ba2;
    font-weight: 600;
}

/* Selection indicator */
.wc-direct-offer-card-vertical::after {
    content: '✓';
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    background: #ffd700;
    color: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 10;
}

.wc-direct-offer-card-vertical.selected::after {
    opacity: 1;
    transform: scale(1);
}

/* Form Groups */
.wc-direct-form-group {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.wc-direct-form-group label {
    display: block;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.wc-direct-form-group .required {
    color: #ffd700;
    margin-left: 3px;
}

/* Input Fields */
.wc-direct-input,
.wc-direct-select {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    background: rgba(255,255,255,0.95);
    font-size: 15px;
    color: #333;
    transition: all 0.3s ease;
    box-sizing: border-box;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.wc-direct-input:focus,
.wc-direct-select:focus {
    outline: none;
    border-color: #ffd700;
    background: #ffffff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

.wc-direct-input::placeholder {
    color: #999;
    font-size: 14px;
}

/* Select Dropdown */
.wc-direct-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
    cursor: pointer;
}

/* Submit Button */
.wc-direct-button {
    width: 100%;
    padding: 18px 25px;
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    color: #333;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255,215,0,0.3);
    margin-top: 10px;
}

.wc-direct-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255,215,0,0.4);
    background: linear-gradient(135deg, #ffb347 0%, #ffd700 100%);
}

.wc-direct-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(255,215,0,0.3);
}

.wc-direct-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Message Area */
.wc-direct-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    display: none;
    animation: slideIn 0.3s ease;
    position: relative;
    z-index: 1;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wc-direct-message.success {
    background: rgba(76, 175, 80, 0.95);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.wc-direct-message.error {
    background: rgba(244, 67, 54, 0.95);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

/* Hide original add to cart */
.cart,
.single_add_to_cart_button,
.woocommerce-variation-add-to-cart,
.add_to_cart_button {
    display: none !important;
}

/* Loading Spinner */
.wc-direct-button.loading {
    position: relative;
    color: transparent !important;
}

.wc-direct-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #333;
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Phone validation visual feedback */
.wc-direct-input.wc-phone-valid {
    border-color: #4CAF50 !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%234CAF50" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 35px;
}

.wc-direct-input.wc-phone-invalid {
    border-color: #f44336 !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23f44336" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><circle cx="12" cy="16" r="0.5" fill="%23f44336"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 35px;
}

/* Phone input help text */
.wc-direct-phone-hint {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
    display: block;
}

/* Error message for phone */
.wc-direct-message.error.phone-error {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    border-color: #f44336;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wc-direct-checkout-container {
        padding: 20px;
    }
    
    .wc-direct-checkout-title {
        font-size: 24px;
    }
    
    .wc-direct-offer-label-vertical {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .offer-right {
        align-items: flex-start;
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .offer-price-container {
        align-items: flex-start;
    }
    
    .offer-left .offer-name {
        font-size: 18px;
    }
    
    .offer-old-price {
        font-size: 14px;
    }
    
    .offer-price {
        font-size: 20px;
    }
    
    .offer-quantity {
        font-size: 13px;
        padding: 3px 8px;
    }
    
    .wc-direct-input,
    .wc-direct-select {
        padding: 12px 15px;
    }
    
    .wc-direct-button {
        padding: 15px 20px;
        font-size: 16px;
    }
    
    .wc-direct-offer-card-vertical.selected .wc-direct-offer-label-vertical {
        transform: translateX(0);
    }
}