/* Basic container styling */
.bir-container {
    max-width: 800px;
    margin-top: 20px;
    background: #fff;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    font-family: 'Inter', sans-serif; /* Using Inter font */
}

/* Form section styling */
.bir-form-section {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fcfcfc;
}

/* Form table styling */
.bir-form-section .form-table th {
    padding-left: 0;
    width: 150px; /* Adjust as needed */
}

.bir-form-section .form-table td {
    padding-left: 0;
}

/* Input field styling */
.bir-form-section input[type="text"],
.bir-form-section input[type="file"] {
    width: 100%;
    max-width: 400px; /* Limit width for better readability */
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
    font-size: 14px;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.bir-form-section input[type="text"]:focus,
.bir-form-section input[type="file"]:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba, 0 0 0 3px rgba(0, 124, 186, 0.2);
    outline: none;
}

/* Description text */
.bir-form-section .description {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

/* Submit button styling */
.bir-form-section .submit .button-primary {
    background: #007cba;
    border-color: #007cba;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
    padding: 8px 20px;
    height: auto;
    line-height: 1.5;
    font-size: 16px;
    font-weight: 600;
    border-radius: 5px;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.bir-form-section .submit .button-primary:hover,
.bir-form-section .submit .button-primary:focus {
    background: #006ba1;
    border-color: #006ba1;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15), 0 0 0 1px #006ba1, 0 0 0 3px rgba(0, 124, 186, 0.2);
    outline: none;
}

/* Message box styling */
#bir-message-box {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

#bir-message-box.bir-hidden {
    display: none;
}

.bir-message.bir-warning {
    background-color: #fff3cd; /* Light yellow */
    border: 1px solid #ffc107; /* Orange border */
    color: #856404;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

#bir-message-box.bir-success {
    background-color: #e6ffe6; /* Light green */
    border: 1px solid #4CAF50; /* Green border */
    color: #333;
}

#bir-message-box.bir-error {
    background-color: #ffe6e6; /* Light red */
    border: 1px solid #f44336; /* Red border */
    color: #333;
}

#bir-status-message {
    margin: 0;
}

/* Download link styling */
#bir-download-link-container {
    margin-top: 15px;
    text-align: center;
}

#bir-download-link-container.bir-hidden {
    display: none;
}

#bir-download-link {
    background: #28a745; /* Green */
    border-color: #28a745;
    color: #fff;
    padding: 10px 25px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

#bir-download-link:hover,
#bir-download-link:focus {
    background: #218838;
    border-color: #1e7e34;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15), 0 0 0 1px #218838, 0 0 0 3px rgba(40, 167, 69, 0.2);
    outline: none;
}

/* Loading Spinner */
.bir-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #007cba; /* Blue spinner */
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: bir-spin 1s linear infinite;
    display: none; /* Hidden by default */
    flex-shrink: 0; /* Prevent shrinking when message is long */
}

@keyframes bir-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Image Preview Section */
#bir-image-preview-container {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fcfcfc;
}

#bir-image-preview-container h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

#bir-image-preview-container.bir-hidden {
    display: none;
}

#bir-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); /* Responsive grid */
    gap: 15px;
    justify-content: center;
}

.bir-image-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    padding: 5px;
}

.bir-preview-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 3px;
}
