/* Gift Voucher Sender - Frontend Styles */

.gvs-form-container {
    max-width: 500px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #e2e4e7;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    position: relative;
    overflow: hidden;
}

.gvs-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gvs-form-header {
    text-align: center;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid #f1f1f1;
}

.gvs-form-header h3 {
    margin: 0 0 15px 0;
    color: #1e1e1e;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.gvs-voucher-value {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    display: inline-block;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
}

.gvs-voucher-value::before {
    content: '🎁';
    margin-right: 8px;
    font-size: 16px;
}

.gvs-gift-form {
    position: relative;
}

.gvs-form-fields {
    margin-bottom: 30px;
}

.gvs-field {
    margin-bottom: 25px;
    position: relative;
}

.gvs-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1e1e1e;
    font-size: 15px;
}

.gvs-field input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e4e7;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #fafafa;
}

.gvs-field input:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.gvs-field input:valid {
    border-color: #28a745;
}

.gvs-field input::placeholder {
    color: #8e8e93;
    opacity: 1;
}

.gvs-field small {
    color: #646970;
    font-size: 13px;
    margin-top: 6px;
    display: block;
    font-style: italic;
}

/* Input Icons */
.gvs-field:nth-child(1) input {
    padding-left: 50px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23667eea' viewBox='0 0 24 24'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 15px center;
    background-size: 20px;
}

.gvs-field:nth-child(2) input {
    padding-left: 50px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23667eea' viewBox='0 0 24 24'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 15px center;
    background-size: 20px;
}

.gvs-field:nth-child(3) input {
    padding-left: 50px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23667eea' viewBox='0 0 24 24'%3E%3Cpath d='M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 15px center;
    background-size: 20px;
}

.gvs-field:nth-child(4) input {
    padding-left: 50px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23667eea' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 15px center;
    background-size: 20px;
}

.gvs-form-actions {
    text-align: center;
}

.gvs-send-button {
    width: 100%;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.gvs-send-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.gvs-send-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.gvs-send-button:hover::before {
    left: 100%;
}

.gvs-send-button:active {
    transform: translateY(0);
}

.gvs-send-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.gvs-send-button:disabled:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.gvs-button-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gvs-button-loading {
    display: none;
    align-items: center;
    gap: 10px;
}

.gvs-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.gvs-form-message {
    margin-top: 25px;
    padding: 16px 20px;
    border-radius: 8px;
    display: none;
    font-weight: 500;
    position: relative;
    animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gvs-form-message.success {
    background: linear-gradient(135deg, #d1e7dd 0%, #a3d9a5 100%);
    color: #0f5132;
    border: 1px solid #badbcc;
}

.gvs-form-message.success::before {
    content: '✅';
    margin-right: 8px;
}

.gvs-form-message.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f1aeb5 100%);
    color: #842029;
    border: 1px solid #f5c2c7;
}

.gvs-form-message.error::before {
    content: '❌';
    margin-right: 8px;
}

/* Form Validation Styles */
.gvs-field input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.gvs-field input:valid:not(:focus):not(:placeholder-shown) {
    border-color: #28a745;
    background-color: #f0fff0;
}

/* Loading Overlay */
.gvs-form-container.loading {
    position: relative;
}

.gvs-form-container.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
    z-index: 999;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gvs-form-container {
        margin: 0 15px;
        padding: 30px 25px;
        border-radius: 10px;
    }
    
    .gvs-form-header h3 {
        font-size: 24px;
    }
    
    .gvs-voucher-value {
        font-size: 16px;
        padding: 10px 20px;
    }
    
    .gvs-field input {
        padding: 14px 18px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .gvs-field:nth-child(1) input,
    .gvs-field:nth-child(2) input,
    .gvs-field:nth-child(3) input,
    .gvs-field:nth-child(4) input {
        padding-left: 45px;
        background-size: 18px;
        background-position: 12px center;
    }
    
    .gvs-send-button {
        padding: 16px 25px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .gvs-form-container {
        margin: 0 10px;
        padding: 25px 20px;
    }
    
    .gvs-form-header {
        margin-bottom: 25px;
    }
    
    .gvs-field {
        margin-bottom: 20px;
    }
    
    .gvs-field input {
        padding: 12px 16px;
    }
    
    .gvs-field:nth-child(1) input,
    .gvs-field:nth-child(2) input,
    .gvs-field:nth-child(3) input,
    .gvs-field:nth-child(4) input {
        padding-left: 40px;
        background-size: 16px;
        background-position: 10px center;
    }
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .gvs-form-container {
        background: #1a1a1a;
        border-color: #333;
        color: #fff;
    }
    
    .gvs-form-header h3 {
        color: #fff;
    }
    
    .gvs-field label {
        color: #fff;
    }
    
    .gvs-field input {
        background: #2a2a2a;
        border-color: #444;
        color: #fff;
    }
    
    .gvs-field input:focus {
        background: #333;
        border-color: #667eea;
    }
    
    .gvs-field input::placeholder {
        color: #888;
    }
    
    .gvs-field small {
        color: #ccc;
    }
}

/* Accessibility Improvements */
.gvs-send-button:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.gvs-field input:focus {
    outline: none;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .gvs-form-container {
        border: 2px solid #000;
    }
    
    .gvs-field input {
        border: 2px solid #000;
    }
    
    .gvs-send-button {
        background: #000;
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .gvs-field input,
    .gvs-send-button,
    .gvs-form-message {
        transition: none;
        animation: none;
    }
    
    .gvs-send-button:hover {
        transform: none;
    }
    
    .gvs-spinner {
        animation: none;
    }
}