/**
 * Form Components Styles
 *
 * Custom styles for input fields, select dropdowns, and other form elements
 */

/* Base form elements */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"],
textarea,
select {
    display: block;
    width: 100%;
    padding: 10px 15px;
    font-family: 'Manrope', sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Focus states */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="range"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="week"]:focus,
input[type="time"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="color"]:focus,
textarea:focus,
select:focus {
    border-color: #720213;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(114, 2, 19, 0.25);
}

/* Placeholder styling */
::placeholder {
    color: #999;
    opacity: 1;
}

/* Textarea specific */
textarea {
    min-height: 100px;
    resize: vertical;
}

/* Select styling */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333' 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 10px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Checkbox and radio styling */
input[type="checkbox"],
input[type="radio"] {
    margin-right: 8px;
    position: relative;
    top: 2px;
}

/* Form groups */
.form-group,
.woocommerce-form-row,
.form-row {
    margin-bottom: 20px;
}

/* Labels */
label {
    display: block;
    margin-bottom: 8px;
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    color: #333;
}

/* Form inside WooCommerce */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Manrope', sans-serif;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
    border-color: #720213;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(114, 2, 19, 0.25);
}

/* Search form specific */
.search-form {
    display: flex;
    align-items: center;
}

.search-form .search-field {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
    background-color: #F1F1F1;
}

.search-form .search-submit {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding: 10px 20px;
    background-color: #720213;
    color: #fff;
    border: 1px solid #720213;
    cursor: pointer;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    font-weight: 600;
}

/* Quantity inputs in WooCommerce */
.woocommerce .quantity .qty {
    width: 70px;
    text-align: center;
    padding: 8px 5px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* Coupon form in cart */
.woocommerce-cart table.cart td.actions .coupon .input-text {
    width: 150px;
    padding: 10px 15px;
    margin-right: 10px;
    border-radius: 8px;
}

/* Form validation */
.woocommerce form .form-row.woocommerce-invalid .select2-container,
.woocommerce form .form-row.woocommerce-invalid input.input-text,
.woocommerce form .form-row.woocommerce-invalid select {
    border-color: #CC0B2A;
}

.woocommerce form .form-row.woocommerce-validated .select2-container,
.woocommerce form .form-row.woocommerce-validated input.input-text,
.woocommerce form .form-row.woocommerce-validated select {
    border-color: #6dc22e;
}

/* Contact Form 7 specific styles */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="url"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea,
.wpcf7-form select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Manrope', sans-serif;
}

.wpcf7-form input[type="submit"] {
    background-color: #720213;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wpcf7-form input[type="submit"]:hover {
    background-color: #5a0110;
}

/* Comment form */
#commentform input[type="text"],
#commentform input[type="email"],
#commentform input[type="url"],
#commentform textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Manrope', sans-serif;
}

#commentform input[type="submit"] {
    background-color: #720213;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#commentform input[type="submit"]:hover {
    background-color: #5a0110;
}

/* Mini cart form elements */
.widget_shopping_cart .quantity,
.widget_shopping_cart .total {
    font-family: 'Oswald', sans-serif;
}

.widget_shopping_cart .buttons {
    display: flex;
    gap: 10px;
}

.widget_shopping_cart .buttons a {
    flex: 1;
    text-align: center;
    padding: 10px !important;
    font-size: 0.9rem !important;
}

/* Newsletter form */
.newsletter-form input[type="email"] {
    border-radius: 8px;
    padding: 12px 15px;
    border: 1px solid #ddd;
    width: 100%;
    margin-bottom: 10px;
}

.newsletter-form button[type="submit"] {
    background-color: #720213;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .newsletter-form {
        display: flex;
    }
    
    .newsletter-form input[type="email"] {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
        margin-bottom: 0;
    }
    
    .newsletter-form button[type="submit"] {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
        width: auto;
    }
}
