/* ========================================
   Deadline Countdown Widget - Styles
   ======================================== */

/* CSS Variables */
:root {
    --primary-color: #C62E2E;
    --secondary-color: #1e1e1e;
    --accent-color: #C1E172;
    --bg-light: #f8f9fa;
    --text-dark: #1e1e1e;
    --text-muted: #6c757d;
    --white: #ffffff;
    --urgent-red: #dc3545;
    --warning-yellow: #ffc107;
    --safe-green: #28a745;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --box-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #a02525 100%);
    padding: 4rem 0 3rem;
    text-align: center;
    color: var(--white);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: snow;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.7;
}

.hero-icon {
    margin-top: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Tool Section */
.tool-section {
    padding: 3rem 0;
}

.tool-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.tool-card h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

/* Form Styles */
.deadline-form {
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-group input {
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(198, 46, 46, 0.1);
}

.form-group input::placeholder {
    color: #999;
}

/* Button Styles */
.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-primary,
.btn-secondary,
.btn-danger,
.btn-cta-primary,
.btn-cta-secondary {
    padding: 0.875rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #a02525;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

.btn-secondary {
    background: #6c757d;
    color: var(--white);
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--urgent-red);
    color: var(--white);
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* Controls Section */
.controls-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    padding: 1.5rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.notification-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.control-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: var(--transition);
    border-radius: 30px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(30px);
}

/* Deadlines Container */
.deadlines-container {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
}

.deadlines-container h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.deadlines-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.125rem;
}

/* Deadline Card */
.deadline-card {
    background: var(--white);
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius-sm);
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
}

.deadline-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

.deadline-card.urgent {
    border-color: var(--urgent-red);
    background: #fff5f5;
}

.deadline-card.warning {
    border-color: var(--warning-yellow);
    background: #fffef5;
}

.deadline-card.safe {
    border-color: var(--safe-green);
    background: #f5fff5;
}

.deadline-card.overdue {
    border-color: #721c24;
    background: #f8d7da;
}

.deadline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.deadline-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.deadline-client {
    font-size: 0.95rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.delete-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: var(--transition);
}

.delete-btn:hover {
    color: var(--urgent-red);
    transform: scale(1.2);
}

.countdown-display {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.countdown-unit {
    text-align: center;
    background: var(--bg-light);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    min-width: 80px;
}

.countdown-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.deadline-card.urgent .countdown-value {
    color: var(--urgent-red);
}

.deadline-card.warning .countdown-value {
    color: #d39e00;
}

.deadline-card.safe .countdown-value {
    color: var(--safe-green);
}

.countdown-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.deadline-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.deadline-date {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.urgency-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.urgency-badge.urgent {
    background: var(--urgent-red);
    color: var(--white);
}

.urgency-badge.warning {
    background: var(--warning-yellow);
    color: var(--text-dark);
}

.urgency-badge.safe {
    background: var(--safe-green);
    color: var(--white);
}

.urgency-badge.overdue {
    background: #721c24;
    color: var(--white);
}

.deadline-notes {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 4px;
}

.overdue-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #721c24;
    text-align: center;
    padding: 1rem;
}

/* Features Section */
.features-section {
    padding: 4rem 0;
    background: var(--white);
}

.features-section h2 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

.feature-icon {
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* How To Section */
.how-to-section {
    padding: 4rem 0;
    background: var(--bg-light);
}

.how-to-section h2 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.steps-container {
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.step-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.step-content p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #000000 100%);
    padding: 4rem 0;
    color: var(--white);
}

.cta-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-section h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: snow;
}

.cta-section p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn-cta-primary {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
}

.btn-cta-primary:hover {
    background: #a02525;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(198, 46, 46, 0.3);
}

.btn-cta-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
}

.btn-cta-secondary:hover {
    background: var(--white);
    color: var(--text-dark);
    transform: translateY(-2px);
}

.cta-features {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.cta-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

/* Content Section */
.content-section {
    padding: 4rem 0;
    background: var(--white);
}

.content-section article {
    max-width: 900px;
    margin: 0 auto;
}

.content-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.content-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.content-section p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--text-muted);
}

/* FAQ Section */
.faq-section {
    padding: 4rem 0;
    background: var(--bg-light);
}

.faq-section h2 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.faq-question {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--bg-light);
}

.faq-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 1.5rem 1.25rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 1.875rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group button {
        width: 100%;
    }

    .controls-section {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .notification-control {
        width: 100%;
        justify-content: center;
    }

    .btn-danger {
        width: 100%;
    }

    .countdown-display {
        justify-content: center;
    }

    .countdown-unit {
        min-width: 70px;
    }

    .deadline-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .step {
        flex-direction: column;
        text-align: center;
    }

    .step-number {
        margin: 0 auto;
    }

    .cta-section h2 {
        font-size: 1.75rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn-cta-primary,
    .btn-cta-secondary {
        width: 100%;
    }

    .cta-features {
        flex-direction: column;
        align-items: center;
    }

    .content-section h2 {
        font-size: 1.5rem;
    }

    .content-section h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .tool-card,
    .deadlines-container {
        padding: 1.5rem;
    }

    .deadline-card {
        padding: 1rem;
    }

    .countdown-value {
        font-size: 1.5rem;
    }

    .countdown-label {
        font-size: 0.75rem;
    }
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.deadline-card {
    animation: fadeIn 0.3s ease;
}

/* Print Styles */
@media print {
    .hero-section,
    .controls-section,
    .button-group,
    .delete-btn,
    .cta-section,
    #site-header,
    #site-footer {
        display: none;
    }

    .deadline-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}