.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid #0251C5;
    color: #0251C5;
    font-weight: 500;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
    vertical-align: middle;
}

.dc-inline-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dc-faq-list dt {
    font-weight: 500;
    margin-top: 15px;
    color: #212529;
}

.dc-faq-list dd {
    margin-left: 0;
    margin-bottom: 10px;
    color: #495057;
    line-height: 1.6;
}

.date-calculator-wrapper {
    max-width: 900px;
    margin: 0 auto 40px;
    scroll-margin-top: 20px;
    min-height: 550px;
}

.dc-container {
    display: flex;
    flex-wrap: wrap;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.dc-input-section,
.dc-result-section {
    flex: 1;
    min-width: 300px;
    padding: 10px 20px 20px 20px;
}

.dc-input-section {
    border-right: 1px solid #e9ecef;
}

.dc-input-title {
    font-size: 25px;
    margin-top: 0;
    margin-bottom: 12px;
    color: #212529;
}

.dc-result-section {
    background-color: white;
    scroll-margin-top: 50px;
}

.dc-tabs {
    display: flex;
    margin-bottom: 20px;
    gap: 8px;
}

.dc-tab {
    flex: 1;
    padding: 12px 5px;
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    line-height: 1.2;
    font-size: 15px;
    color: #495057;
    transition: all 0.3s;
    text-align: center;
}

.dc-tab:hover:not(.active) {
    background-color: #f1f3f5;
    color: #495057;
}

.dc-tab:active {
    transform: scale(0.97);
}

.dc-tab.active {
    color: #fff;
    background-color: #238839;
}

.dc-tab-content {
    display: none;
}

.dc-tab-content.active {
    display: block;
}

.dc-result-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    padding-top: 0;
}

.dc-copy-btn,
.dc-download-btn {
    padding: 8px 15px;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s;
}

.dc-copy-btn,
.dc-download-btn {
    background-color: #0055B8;
    color: white;
}

.dc-copy-btn:hover,
.dc-copy-btn:focus,
.dc-download-btn:hover {
    background-color: #0055B8;
}

.dc-copy-btn:active,
.dc-download-btn:active {
    transform: scale(0.97);
}

.dc-copy-btn:disabled,
.dc-download-btn:disabled {
    background-color: #e9ecef;
    color: #494e53;
    cursor: not-allowed;
}

.dc-action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.dc-calculate-btn,
.dc-clear-btn {
    padding: 8px 13px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 15px;
    color: #495057;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    transition: background-color 0.2s, transform 0.1s;
}

.dc-calculate-btn,
.dc-clear-btn:hover {
    /* Keep clear button styles the same on hover */
    background-color: #f8f9fa;
    color: #495057;
}

.dc-clear-btn:focus {
    background-color: #f8f9fa;
    color: #495057;
}

.dc-calculate-btn {
    background-color: #0055B8;
    color: white;
    font-size: 15px;
}

.dc-calculate-btn:hover {
    /* Keep calculate button background the same on hover */
    background-color: #0055B8;
}

.dc-calculate-btn:active,
.dc-clear-btn:active {
    transform: scale(0.97);
}

.dc-input-group {
    margin-bottom: 15px;
}

.dc-input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #212529;
}

.dc-custom-date {
    display: flex;
    gap: 4px;
    /* Reduced gap */
    align-items: center;
}

.dc-custom-date select,
.dc-custom-date input {
    font-size: 15px;
    padding: 5px;
    min-width: 60px;
    border-radius: 6px;
    border: 1px solid lightgrey;
    background-color: #fff;
}

.dc-custom-time input,
.dc-custom-time select {
    font-size: 15px;
    padding: 5px 8px;
    width: 55px;
    border-radius: 6px;
    border: 1px solid lightgrey;
    background-color: #fff;
}

.dc-custom-time input[type="number"] {
    padding: 5px 10px;
}

.dc-checkbox-group,
.dc-input-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.dc-checkbox-group input[type="checkbox"],
.dc-input-checkbox input[type="checkbox"] {
    width: 15px;
    height: 15px;
    vertical-align: middle;
}

.dc-period-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.dc-period-row label {
    display: block;
    font-weight: 500;
    color: #212529;
}

.dc-period-row input {
    padding: 10px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    height: 40px;
    background-color: #fff;
}

.dc-holidays-group {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 15px;
    background-color: #fdfdfd;
}

.dc-weekday-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    justify-content: flex-start;
}

.dc-weekday-checkboxes label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.dc-custom-holiday-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dc-holidays-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.dc-custom-holiday-input {
    width: 70px;
    padding: 5px 8px !important;
    font-size: 15px;
    border-radius: 6px;
    border: 1px solid lightgrey;
    text-align: center;
}

.dc-holiday-error {
    color: #D8000C;
    /* Red color for error */
    font-size: 14px;
}


/* --- Override Theme Styles & Define Custom Focus/Hover/Active States --- */
.date-calculator-wrapper input[type="number"],
.date-calculator-wrapper select {
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.date-calculator-wrapper input[type="number"]:hover,
.date-calculator-wrapper select:hover,
.date-calculator-wrapper input[type="number"]:focus,
.date-calculator-wrapper select:focus,
.date-calculator-wrapper input[type="number"]:active,
.date-calculator-wrapper select:active {
    background-color: white;
    /* Force white background */
    border-radius: 6px;
    /* Maintain rounded corners */
}

.date-calculator-wrapper input[type="number"]:focus,
.date-calculator-wrapper select:focus,
.date-calculator-wrapper input[type="number"]:active,
.date-calculator-wrapper select:active {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.5px rgba(13, 110, 253, 0.25);
    outline: none;
    background-color: white;
}

/* --- IMPROVED DROPDOWN STYLES FOR DESKTOP --- */
.dc-date-day,
.dc-date-month,
.dc-date-year,
.dc-time-hour,
.dc-time-minute,
.dc-time-second,
.dc-time-ampm {
    min-width: 60px;
    max-width: 120px;
    font-size: 15px;
    padding: 10px 8px;
    text-align: left;
    box-sizing: border-box;
    height: 35px;
}

.dc-date-year {
    width: 65px;
    min-width: 80px;
}

.dc-result-title {
    color: #0055B8;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.25rem;
    padding-bottom: 0;
}

.dc-result-content {
    margin-top: 10px;
}

.dc-result-group {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #e9ecef;
}

.dc-result-item {
    padding: 2px 0;
}

.dc-result-label {
    font-weight: 500;
    color: #495057;
}

.dc-result-value {
    font-weight: 500;
    color: #0055B8;
    font-size: 16px;
}

.dc-hidden {
    display: none;
}

.dc-time-separator {
    font-weight: bold;
    display: inline-flex;
    align-items: center;
}

.dc-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    border-top-color: #fff;
    animation: dc-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes dc-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Custom arrow for select dropdowns */
.date-calculator-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 8L10 12L14 8' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 2px center;
    background-size: 18px;
    padding-right: 10px;
    cursor: pointer;
}

/* Remove number input arrows */
.date-calculator-wrapper input[type=number]::-webkit-inner-spin-button,
.date-calculator-wrapper input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.date-calculator-wrapper input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
    border-radius: 6px;
    border: 1px solid lightgrey;
    background-color: #fff;
}

.faq-list {
    margin-top: 1rem;
}

.faq-list dt {
    font-weight: 500;
    font-size: 1.1em;
}

.faq-list dd {
    margin-left: 0;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
    padding-bottom: 10px;
    border-bottom: 1px dashed #ddd;
}

/* --- MOBILE STYLES --- */
@media (max-width: 768px) {
    .dc-tabs {
        flex-wrap: wrap;
    }

    .dc-tab {
        padding: 5px;
    }

    .dc-copy-btn,
    .dc-download-btn {
        padding: 10px;
    }

    .dc-calculate-btn,
    .dc-clear-btn {
        padding: 10px;
    }

    .dc-container {
        flex-direction: column;
        box-shadow: none;
        border-radius: 0;
        border-top: 1px solid #e9ecef;
        border-bottom: 1px solid #e9ecef;
    }

    .dc-input-title {
        text-align: center;
    }

    .dc-result-actions {
        justify-content: center;
    }

    .dc-input-section,
    .dc-result-section {
        padding-left: 1px;
        padding-right: 1px;
        border-right: none;
    }

    .dc-date-day,
    .dc-date-month,
    .dc-date-year,
    .dc-time-hour,
    .dc-time-minute,
    .dc-time-second,
    /* Added for consistency */
    .dc-time-second,
    .dc-time-ampm {
        font-size: 16px;
        padding: 12px 10px;
        background-color: #fff;
    }

    .dc-custom-date select,
    .dc-custom-date input {
        font-size: 16px;
        min-width: 70px;
        height: 38px;
        border-radius: 8px;
        border: 0.5px solid lightgrey;
        background-color: #fff;
    }

    .dc-custom-time input,
    .dc-custom-time select {
        height: 40px;
        padding: 10px 8px;
    }
    
    .dc-checkbox-group input[type="checkbox"],
    .dc-input-checkbox input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }
}