/* Import Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Main App Container - Namespace for WP compatibility */
#date-duration-calculator-pro {
    font-family: 'Inter', sans-serif;
    background-color:white; /* Dark background */

	  color: #484c53;
    padding: 40px;
    border-radius: 20px;
    max-width: 100%;
    margin: 40px auto;
    border: 1px solid #374151;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}



/* Calculator Inner Wrapper */


.ddc-pro-calculator-wrapper {
	background-color: #fffefe;
	padding: 30px;
	border-radius: 16px;
	margin-bottom: 30px;
	border: 1px solid #4b5563;
}

/* Header */
.ddc-pro-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    color: #f9fafb;
}

.ddc-pro-header-icon {
    width: 32px;
    height: 32px;
    margin-right: 15px;
    color: #7c3aed;
}

.ddc-pro-title {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
}

/* Form and Inputs */
.ddc-pro-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.ddc-pro-inputs-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
}

.ddc-pro-input-group {
    flex: 1;
}

.ddc-pro-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: #9ca3af;
}

.ddc-pro-input-field {
    width: 100%;
    padding: 14px 18px;
    font-size: 1.1rem;
    font-family: 'Inter', sans-serif;
    color: #f9fafb;
    background-color: #374151;
    border: 2px solid #4b5563;
    border-radius: 10px;
    transition: border-color 0.3s, box-shadow 0.3s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.ddc-pro-input-field::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.ddc-pro-input-field:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.3);
}

.ddc-pro-arrow {
    color: #6b7280;
    font-size: 1.5rem;
    padding-bottom: 15px;
}

/* Controls and Buttons */
.ddc-pro-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.ddc-pro-button {
    border: none;
    padding: 14px 30px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-grow: 1;
    max-width: 250px;
}

.ddc-pro-button-calculate {
    background: linear-gradient(90deg, #8b5cf6, #d946ef);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.ddc-pro-button-calculate:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(217, 70, 239, 0.3);
}

.ddc-pro-button-clear {
    background-color: transparent;
    color: #9ca3af;
    border: 2px solid #4b5563;
}

.ddc-pro-button-clear:hover {
    background-color: #374151;
    color: #f9fafb;
    border-color: #6b7280;
}

/* Results Section */
.ddc-pro-results-section {
    display: none; /* Hidden by default */
    margin-top: 30px;
    animation: ddc-pro-fadeIn 0.8s ease-in-out;
}

@keyframes ddc-pro-fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ddc-pro-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.ddc-pro-result-card {
    background-color: #1f2937;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #374151;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ddc-pro-result-icon svg {
    width: 28px;
    height: 28px;
    color: #a78bfa;
}

.ddc-pro-result-text {
    text-align: left;
}

.ddc-pro-result-card .ddc-pro-result-label {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 2px;
}

.ddc-pro-result-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #e5e7eb;
    line-height: 1.2;
}
.ddc-pro-result-value span {
    font-size: 1rem;
    font-weight: 400;
    color: #9ca3af;
    margin-left: 4px;
}

.ddc-pro-result-main {
    background: linear-gradient(135deg, #8b5cf6, #d946ef);
    color: white;
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 20px;
}

.ddc-pro-result-main .ddc-pro-result-label {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
}

.ddc-pro-result-value-large {
    font-size: 2.2rem;
    font-weight: 700;
    margin-top: 8px;
    line-height: 1.2;
}

.ddc-pro-summary-text {
    background-color: #1f2937;
    border-radius: 12px;
    padding: 20px;
    font-size: 1rem;
    line-height: 1.6;
    color: #d1d5db;
    border: 1px solid #374151;
}

.ddc-pro-summary-text span {
    color: #a78bfa;
    font-weight: 600;
}

/* Content Section */
.ddc-pro-content-wrapper {
    padding: 20px 10px 10px 10px;
}

.ddc-pro-content-section {
    margin-bottom: 30px;
}



.ddc-pro-content-heading {
	font-size: 1.5rem;
	font-weight: 600;
	color: #50565c;
	margin-bottom: 15px;
	border-bottom: 2px solid #4f46e5;
	padding-bottom: 8px;
}


.ddc-pro-content-subheading {
	font-size: 1.2rem;
	font-weight: 600;
	color: #4c3f7b;
	margin-top: 25px;
	margin-bottom: 10px;
}


.ddc-pro-content-text {
	line-height: 1.8;
	color: #4c5b71;
}
.ddc-pro-content-list {
    padding-left: 25px;
    list-style-type: disc;
}
.ddc-pro-content-list li, .ddc-pro-content-text ol li {
    margin-bottom: 10px;
}
.ddc-pro-content-text ol {
    padding-left: 25px;
}


/* Custom Calculation Visuals */
.ddc-calc-visual {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    background-color: #1f2937;
    border-radius: 10px;
    padding: 20px;
    margin-top: 15px;
    border: 1px solid #374151;
}
.ddc-calc-math {
    font-family: 'Courier New', 'monospace';
    font-size: 1.1rem;
    color: #e5e7eb;
    flex-shrink: 0;
}
.ddc-calc-math pre {
    margin: 0;
    letter-spacing: 2px;
}
.ddc-calc-line {
    border: 0;
    border-top: 2px solid #6b7280;
    margin: 5px 0;
}


.ddc-calc-desc {
	flex-grow: 1;
	min-width: 250px;
	color: white;
}
.ddc-calc-desc ol {
    padding-left: 20px; margin: 0;
}
.ddc-borrow-strike {
    text-decoration: line-through;
    color: #fca5a5; /* Light red */
}
.ddc-borrow-change {
    color: #86efac; /* Light green */
}
.ddc-borrow-add {
    position: relative;
    top: -0.8em;
    left: -2em;
    font-size: 0.9em;
    color: #86efac;
}

/* Related Calculators */
.ddc-pro-related-calculators {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #374151;
}
/* .ddc-pro-related-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #d1d5db;
    margin-bottom: 15px;
} */

.ddc-pro-related-title {
	font-size: 1.1rem;
	font-weight: 600;
	color: #525c6a;
	margin-bottom: 15px;
}


.ddc-pro-related-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ddc-pro-related-list li {
    margin-bottom: 10px;
}


.ddc-pro-related-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #6451ac;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.3s;
}


.ddc-pro-related-link:hover {
    color: #a78bfa;
    text-decoration: underline;
}
.ddc-pro-related-icon {
    width: 16px;
    height: 16px;
}

/* --- Responsive Styles --- */

/* For Smaller Desktops and Large Tablets (e.g., iPad Pro Landscape) */
@media (max-width: 1024px) {
    #date-duration-calculator-pro {
        padding: 30px;
        margin: 30px auto;
    }

    .ddc-pro-title {
        font-size: 1.6rem;
    }

    .ddc-pro-results-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .ddc-pro-result-card {
        padding: 25px;
    }
}


/* For Tablets (e.g., iPad Portrait) */
@media (max-width: 768px) {
    #date-duration-calculator-pro {
        padding: 25px;
        margin: 20px auto;
        border-radius: 15px;
    }

    .ddc-pro-calculator-wrapper {
        padding: 20px;
    }

    /* Stack input fields vertically */
    .ddc-pro-inputs-container {
        flex-direction: column;
        align-items: stretch; /* Make inputs full width */
        gap: 25px;
    }

    /* Hide the arrow icon between inputs on vertical layout */
    .ddc-pro-arrow {
        display: none;
    }

    /* Make control buttons stack if needed, but they are flexible */
    .ddc-pro-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ddc-pro-button {
        max-width: 100%; /* Allow buttons to fill the container */
    }

    /* Stack result cards into a single column */
    .ddc-pro-results-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .ddc-pro-result-value {
        font-size: 1.3rem;
    }
    
    .ddc-pro-result-value-large {
        font-size: 2rem;
    }

    .ddc-pro-content-heading {
        font-size: 1.3rem;
    }
    
    .ddc-pro-content-subheading {
        font-size: 1.1rem;
    }
    
    /* Stack the calculation visual */
    .ddc-calc-visual {
        flex-direction: column;
        align-items: flex-start;
    }
    .ddc-calc-desc {
        min-width: 100%;
    }

}


/* For Large Mobile Phones */
@media (max-width: 600px) {
    #date-duration-calculator-pro {
        padding: 20px;
        margin: 15px auto;
        border: none; /* Remove border for a more seamless mobile view */
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }
    
    .ddc-pro-header {
        margin-bottom: 25px;
    }

    .ddc-pro-header-icon {
        width: 28px;
        height: 28px;
    }

    .ddc-pro-title {
        font-size: 1.5rem;
    }

    .ddc-pro-form {
        gap: 25px;
    }

    .ddc-pro-label {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }

    .ddc-pro-input-field {
        padding: 12px 16px;
        font-size: 1rem;
    }
    
    .ddc-pro-button {
        padding: 12px 25px;
        font-size: 0.95rem;
    }

    .ddc-pro-result-card {
        padding: 20px;
        flex-direction: column; /* Stack icon and text vertically */
        align-items: flex-start;
        text-align: left;
    }
    
    .ddc-pro-result-main {
        padding: 20px;
    }

    .ddc-pro-result-value-large {
        font-size: 1.8rem;
    }
    
    .ddc-pro-summary-text {
        padding: 15px;
        font-size: 0.95rem;
    }

    /* Allow long math calculations to wrap on mobile */
    .ddc-calc-math pre {
        white-space: pre-wrap;
        word-break: break-all;
        font-size: 1rem;
    }
}


/* For Small Mobile Phones */
@media (max-width: 400px) {
    #date-duration-calculator-pro {
        padding: 15px;
        border-radius: 0;
        margin: 0;
        max-width: 100vw;
        min-height: 100vh;
    }

    .ddc-pro-calculator-wrapper {
        padding: 15px;
        border-radius: 12px;
    }

    .ddc-pro-title {
        font-size: 1.3rem;
    }

    .ddc-pro-result-value {
        font-size: 1.2rem;
    }

    .ddc-pro-result-value-large {
        font-size: 1.6rem;
    }
    
    .ddc-pro-result-main .ddc-pro-result-label {
        font-size: 1rem;
    }

    .ddc-pro-content-wrapper {
        padding: 15px 5px 5px 5px;
    }
    
    .ddc-pro-content-heading {
        font-size: 1.2rem;
    }
}
