/* Date Calculation Specific Styles */
/* Using specific class prefixes to avoid conflicts */

.date-calculator {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.date-calc-content {
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    max-height: 2000px;
    /* Adjust based on content */
    opacity: 1;
    overflow: hidden;
}

.date-calc-content.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0;
    margin: 0;
}

.date-calc-header {
    position: relative;
    padding-right: 40px;
    margin-bottom: 20px;
    color: #fff;
    text-align: center;
    font-size: 1.5em;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1000;
    /* Keep header above collapsed content */
}

.date-calc-widget-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    color: rgba(255, 215, 0, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
    /* Keep toggle button above everything */
    padding: 0;
}

.date-calc-widget-toggle:hover {
    color: #ffd700;
    border-color: #ffd700;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.date-calc-widget-toggle .icon {
    transition: transform 0.3s ease;
    line-height: 1;
}

.date-calc-widget-toggle .icon:hover {
    transition: transform 0.3s ease;
    line-height: 1;
    color: orangered
}

/* Results styling */
.date-calc-result {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 215, 0, 0.1);
    border-radius: 8px;
    padding: 15px 40px 15px 15px;
    /* Added right padding for X button */
    margin: 10px 0;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.1);
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    /* Stack content vertically */
}

.date-calc-result.hidden {
    display: none;
}

.date-calc-toggle {
    position: absolute;
    right: 10px;
    top: 10px;
    background: none;
    border: none;
    color: rgba(255, 215, 0, 0.7);
    cursor: pointer;
    font-size: 1.2em;
    padding: 5px;
    transition: all 0.3s ease;
    z-index: 2;
}

.date-calc-toggle:hover {
    color: #ffd700;
    transform: scale(1.1);
}

.date-calc-result-content {
    width: 100%;
}

.date-number-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 5px 0;
    padding: 5px 0;
}

.date-label {
    color: rgba(255, 215, 0, 0.7);
}

.date-number {
    color: #fff;
    font-weight: bold;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .date-calculator {
        width: 95%;
        margin: 10px auto;
        padding: 10px;
    }

    .date-calc-content {
        padding: 15px;
    }

    .date-calc-header {
        font-size: 1.2em;
    }

    .date-calc-result {
        padding: 15px;
        padding-right: 35px;
        font-size: 0.9em;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .date-calculator {
        width: 98%;
        padding: 8px;
    }

    .date-calc-header {
        font-size: 1.1em;
    }
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .date-calculator {
        padding: 10px;
    }

    .date-calc-content {
        padding: 15px;
    }

    .date-calc-result {
        width: 95%;
    }
}

/* Specific Animation for Date Calculator */
.date-calc-fade-in {
    animation: dateCalcFadeIn 0.5s ease-in-out;
}

@keyframes dateCalcFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, 10px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Preserve Glow Effects but with unique classes */
.date-calc-glow {
    transition: all 0.3s ease;
}

.date-calc-glow:hover {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* Button Group Layout */
.date-calc-button-group {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Result Position Variations */
.date-calc-result-between {
    margin: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    padding-bottom: 20px;
}

.date-calc-container {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
}

.date-calc-section {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.date-calc-header {
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5em;
    cursor: pointer;
    transition: color 0.3s ease;
    position: relative;
}

.date-calc-header:hover {
    color: #ffd700;
}

.date-calc-input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.date-calc-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    padding: 10px;
    color: #fff;
    font-size: 1em;
    transition: all 0.3s ease;
}

.date-calc-input:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.date-calc-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.date-calc-button {
    background: linear-gradient(145deg, #2a2a2a, #3a3a3a);
    border: none;
    border-radius: 5px;
    color: #fff;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
    margin: 5px;
}

.date-calc-button:hover {
    background: linear-gradient(145deg, #3a3a3a, #4a4a4a);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    color: #ffd700;
    transform: translateY(-1px);
}

.date-calc-button:active {
    transform: translateY(1px);
}

.date-calc-widget-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    color: rgba(255, 215, 0, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 0;
}

.date-calc-widget-toggle:hover {
    color: #ffd700;
    border-color: #ffd700;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.date-calc-widget-toggle .icon {
    transition: transform 0.3s ease;
    line-height: 1;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .date-calc-container {
        width: 95%;
        margin: 10px auto;
        padding: 10px;
    }

    .date-calc-section {
        padding: 15px;
    }

    .date-calc-input-group {
        gap: 10px;
    }

    .date-calc-button {
        width: 100%;
        margin: 5px 0;
    }

    .date-calc-result {
        padding: 15px;
        padding-right: 35px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .date-calc-container {
        width: 98%;
        padding: 8px;
    }

    .date-calc-header {
        font-size: 1.1em;
    }

    .date-calc-input {
        font-size: 0.9em;
    }
}