.wc-gift-option-wrapper {
    margin: 30px 0;
    padding: 30px;
    background: #f8f9ff;
    border: 2px solid #d1d9ff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(24, 52, 237, 0.08);
    position: relative;
    overflow: hidden;
}

.wc-gift-option-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #1834ED;
}

.wc-gift-fields-header {
    margin-bottom: 25px;
    text-align: center;
    padding-bottom: 20px;
    position: relative;
}

.wc-gift-fields-header .gift-title {
    margin: 0 0 15px 0;
    color: #1834ED;
    font-size: 1.75em;
    font-weight: 700;
    line-height: 1.2;
}

.wc-gift-fields-header .gift-description {
    margin: 0 auto 35px auto;
    max-width: 600px;
}

.wc-gift-fields-header .gift-subtitle {
    margin: 0 0 20px 0;
    color: #1834ED;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
}

.wc-gift-fields-header .gift-content {
    color: #475569;
    font-size: 1.1em;
    line-height: 1.8;
    font-weight: 400;
    text-align: center;
}

.wc-gift-fields-header .gift-description br {
    display: block;
    margin-bottom: 12px;
}

.wc-gift-fields {
    background: rgba(255, 255, 255, 0.7);
    padding: 25px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.wc-gift-fields .form-row-group {
    display: grid;
    gap: 20px;
    margin-bottom: 25px;
}

.wc-gift-fields .form-row {
    margin-bottom: 20px;
}

.wc-gift-fields label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 0.95em;
}

.wc-gift-fields .required {
    color: #ef4444;
    margin-left: 2px;
}

.wc-gift-fields input[type="text"],
.wc-gift-fields input[type="email"],
.wc-gift-fields input[type="tel"],
.wc-gift-fields input[type="date"],
.wc-gift-fields textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
    box-sizing: border-box;
}

.wc-gift-fields input:focus,
.wc-gift-fields textarea:focus {
    outline: none;
    border-color: #1834ED;
    box-shadow: 0 0 0 3px rgba(24, 52, 237, 0.1);
    background: #fff;
}

.wc-gift-fields input::placeholder,
.wc-gift-fields textarea::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.wc-gift-fields textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

.wc-gift-fields small {
    display: block;
    margin-top: 5px;
    color: #6b7280;
    font-size: 0.85em;
    line-height: 1.4;
}

.wc-gift-fields .error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.error-message {
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
    color: #ef4444;
    font-weight: 500;
}

/* Arabic RTL Support */
.wc-gift-option-wrapper[dir="rtl"] .gift-title,
.wc-gift-option-wrapper[dir="rtl"] .gift-description {
    text-align: right;
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

.wc-gift-option-wrapper[dir="rtl"] .form-row label {
    text-align: right;
}

.wc-gift-option-wrapper[dir="rtl"] input,
.wc-gift-option-wrapper[dir="rtl"] textarea {
    text-align: right;
}

/* Enhanced styling with primary color */
.wc-gift-fields input[type="text"]:hover,
.wc-gift-fields input[type="email"]:hover,
.wc-gift-fields input[type="tel"]:hover,
.wc-gift-fields textarea:hover {
    border-color: #1834ED;
    transition: all 0.2s ease;
}

.wc-gift-fields .required {
    color: #1834ED;
    margin-left: 2px;
    font-weight: 700;
}

/* Add to cart button enhancement when gift form is filled */
.single_add_to_cart_button:hover,
.single_add_to_cart_button:focus {
    background-color: #1834ED !important;
    border-color: #1834ED !important;
}

/* Character counter styling */
.char-counter {
    font-size: 0.8em;
    color: #1834ED !important;
    font-weight: 500;
    text-align: right;
    margin-top: 5px;
}

/* Form validation success state */
.wc-gift-fields input.success,
.wc-gift-fields textarea.success {
    border-color: #10b981;
    background-color: #f0fdf4;
}

/* Add subtle animation to the wrapper */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wc-gift-option-wrapper {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wc-gift-option-wrapper {
        margin: 20px 0;
        padding: 20px 15px;
    }

    .wc-gift-fields-header .gift-title {
        font-size: 1.4em;
    }

    .wc-gift-fields {
        padding: 20px 15px;
    }

    .wc-gift-fields .form-row-group {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .wc-gift-fields-header .gift-title {
        font-size: 1.2em;
    }

    .wc-gift-fields-header .gift-description {
        font-size: 0.9em;
    }
}