/**
 * WooCommerce Custom Input ID Card Manager Styles
 *
 * @package WC_ID_Card_Manager
 */

/* ========================================
   Checkout Fields
   ======================================== */

.wc-id-card-fields {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.wc-id-card-fields h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

.wc-id-card-type,
.wc-id-card-number {
    margin-bottom: 15px;
}

.wc-id-card-type label,
.wc-id-card-number label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.wc-id-card-type select,
.wc-id-card-number input[type="text"] {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.wc-id-card-type select:focus,
.wc-id-card-number input[type="text"]:focus {
    border-color: #0071a1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 113, 161, 0.1);
}

/* ========================================
   User Dashboard
   ======================================== */

.wc-id-card-dashboard {
    margin: 20px 0;
}

.wc-id-card-dashboard h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 20px;
}

.wc-id-card-dashboard p {
    margin-bottom: 20px;
    color: #666;
}

.wc-id-card-form {
    max-width: 600px;
}

.wc-id-card-form .form-row {
    margin-bottom: 20px;
}

.wc-id-card-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.wc-id-card-form select,
.wc-id-card-form input[type="text"] {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.wc-id-card-form select:focus,
.wc-id-card-form input[type="text"]:focus {
    border-color: #0071a1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 113, 161, 0.1);
}

.wc-id-card-form button {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    background-color: #0071a1;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wc-id-card-form button:hover {
    background-color: #005177;
}

/* ========================================
   Shortcode
   ======================================== */

.wc-id-card-shortcode {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.wc-id-card-shortcode-form {
    max-width: 600px;
}

.wc-id-card-shortcode-form .form-row {
    margin-bottom: 20px;
}

.wc-id-card-shortcode-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.wc-id-card-shortcode-form select,
.wc-id-card-shortcode-form input[type="text"] {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.wc-id-card-shortcode-form select:focus,
.wc-id-card-shortcode-form input[type="text"]:focus {
    border-color: #0071a1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 113, 161, 0.1);
}

.wc-id-card-shortcode-form button {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    background-color: #0071a1;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wc-id-card-shortcode-form button:hover {
    background-color: #005177;
}

/* ========================================
   Messages
   ======================================== */

.woocommerce-message {
    padding: 12px 15px;
    margin-bottom: 20px;
    background-color: #4CAF50;
    color: #fff;
    border-radius: 4px;
}

/* ========================================
   Mobile Responsive Styles
   ======================================== */

/* Tablets and smaller */
@media screen and (max-width: 768px) {
    .wc-id-card-fields,
    .wc-id-card-shortcode {
        padding: 15px;
    }

    .wc-id-card-fields h3 {
        font-size: 16px;
    }

    .wc-id-card-type select,
    .wc-id-card-number input[type="text"],
    .wc-id-card-form select,
    .wc-id-card-form input[type="text"],
    .wc-id-card-shortcode-form select,
    .wc-id-card-shortcode-form input[type="text"] {
        padding: 14px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Mobile phones */
@media screen and (max-width: 480px) {
    .wc-id-card-fields,
    .wc-id-card-shortcode {
        padding: 12px;
        margin: 15px 0;
    }

    .wc-id-card-form,
    .wc-id-card-shortcode-form {
        max-width: 100%;
    }

    .wc-id-card-form button,
    .wc-id-card-shortcode-form button {
        width: 100%;
        padding: 14px 24px;
    }
}

/* Touch devices - Ensure minimum tap target size */
@media (hover: none) and (pointer: coarse) {
    .wc-id-card-type select,
    .wc-id-card-number input[type="text"],
    .wc-id-card-form select,
    .wc-id-card-form input[type="text"],
    .wc-id-card-shortcode-form select,
    .wc-id-card-shortcode-form input[type="text"],
    .wc-id-card-form button,
    .wc-id-card-shortcode-form button {
        min-height: 44px; /* Minimum tap target size */
    }
}

/* ========================================
   Accessibility
   ======================================== */

/* Focus states for keyboard navigation */
.wc-id-card-type select:focus-visible,
.wc-id-card-number input[type="text"]:focus-visible,
.wc-id-card-form select:focus-visible,
.wc-id-card-form input[type="text"]:focus-visible,
.wc-id-card-shortcode-form select:focus-visible,
.wc-id-card-shortcode-form input[type="text"]:focus-visible {
    outline: 2px solid #0071a1;
    outline-offset: 2px;
}

.wc-id-card-form button:focus-visible,
.wc-id-card-shortcode-form button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
