/**
 * WooCommerce Invoice Receipt Selector - Checkout Styles
 * 
 * Styles for the document type selector and invoice fields at checkout.
 * Uses minimal design with black, white, and accent color.
 * No shadows as per design preference.
 */

/* =====================================================
   Document Selector Container
   ===================================================== */
.wcirs-document-selector {
    margin: 20px 0 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
}

/* Section heading */
.wcirs-document-selector h3 {
    margin: 0 0 15px 0;
    padding: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Required asterisk */
.wcirs-document-selector h3 abbr.required {
    color: #d93a5e;
    text-decoration: none;
    border: none;
}

/* =====================================================
   Radio Buttons Style
   ===================================================== */
.wcirs-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 0;
    padding: 0;
}

/* Individual radio label container */
.wcirs-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #fff;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    min-width: 120px;
    justify-content: center;
}

/* Hover state for radio labels */
.wcirs-radio-label:hover {
    border-color: #333;
}

/* Selected state for radio labels */
.wcirs-radio-label:has(input:checked) {
    border-color: #d93a5e;
    background: #fff;
}

/* Radio input styling */
.wcirs-radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #d93a5e;
    cursor: pointer;
}

/* Radio label text */
.wcirs-radio-label span {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* =====================================================
   Dropdown Style
   ===================================================== */
.wcirs-document-select {
    width: 100%;
    max-width: 300px;
    padding: 12px 15px;
    font-size: 14px;
    border: 2px solid #e0e0e0;
    background: #fff;
    color: #333;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color 0.2s ease;
}

/* Dropdown hover and focus states */
.wcirs-document-select:hover,
.wcirs-document-select:focus {
    border-color: #d93a5e;
    outline: none;
}

/* =====================================================
   Invoice Fields Container
   ===================================================== */
.wcirs-invoice-fields {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    animation: wcirs-slideDown 0.3s ease;
}

/* Slide down animation for invoice fields */
@keyframes wcirs-slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form rows within invoice fields */
.wcirs-invoice-fields .form-row {
    margin-bottom: 15px;
}

/* Labels in invoice fields */
.wcirs-invoice-fields label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* Required asterisk in labels */
.wcirs-invoice-fields label abbr.required {
    color: #d93a5e;
    text-decoration: none;
    border: none;
}

/* Input fields styling */
.wcirs-invoice-fields input[type="text"],
.wcirs-invoice-fields input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    border: 2px solid #e0e0e0;
    background: #fff;
    color: #333;
    transition: border-color 0.2s ease;
}

/* Input focus state */
.wcirs-invoice-fields input[type="text"]:focus,
.wcirs-invoice-fields input[type="number"]:focus {
    border-color: #d93a5e;
    outline: none;
}

/* Input placeholder */
.wcirs-invoice-fields input::placeholder {
    color: #999;
}

/* =====================================================
   Order Details Table (Thank You Page, My Account)
   ===================================================== */
.wcirs-order-invoice-details {
    margin: 30px 0;
}

.wcirs-order-invoice-details h2 {
    margin: 0 0 15px 0;
    padding: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.wcirs-details-table {
    width: 100%;
    border-collapse: collapse;
}

.wcirs-details-table th,
.wcirs-details-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.wcirs-details-table th {
    background: #f9f9f9;
    font-weight: 600;
    width: 40%;
}

.wcirs-details-table td {
    background: #fff;
}

/* =====================================================
   Responsive Styles
   ===================================================== */
@media screen and (max-width: 600px) {
    /* Stack radio buttons vertically on mobile */
    .wcirs-radio-group {
        flex-direction: column;
    }
    
    .wcirs-radio-label {
        width: 100%;
        justify-content: flex-start;
    }
    
    /* Full width dropdown on mobile */
    .wcirs-document-select {
        max-width: 100%;
    }
    
    /* Adjust invoice fields layout */
    .wcirs-invoice-fields .form-row-first,
    .wcirs-invoice-fields .form-row-last {
        width: 100%;
        float: none;
    }
    
    /* Table layout on mobile */
    .wcirs-details-table th,
    .wcirs-details-table td {
        display: block;
        width: 100%;
    }
    
    .wcirs-details-table th {
        border-bottom: none;
        padding-bottom: 5px;
    }
    
    .wcirs-details-table td {
        padding-top: 5px;
    }
}

