@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary);
    border-color: #1861ac;
}

.btn-primary-dark {
    color: #fff;
    background-color: var(--primary-dark);
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--primary);
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgM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ODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }


/* Modern color palette */
:root {
    --primary: #1b6ec2;
    --primary-dark: #4f46e5;
    --primary-light: #2196f3;
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg: #f9fafb;
    --surface: #ffffff;
    --text: #1f2937;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Container & Layout */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
}

h1, h2, h3 {
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

/* Buttons */
button, .btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
}

    button:hover {
        background: var(--primary-dark);
        transform: translateY(-1px);
    }

    button:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.btn-secondary {
    background: var(--text-light);
}

.btn-danger {
    background: var(--danger);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Forms */
input, select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
}

    input:focus {
        border-color: var(--primary);
        outline: none;
    }

/* Chore Items */
.chore-item {
    background: var(--surface);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}

    .chore-item.completed {
        opacity: 0.8;
        background: linear-gradient(90deg, var(--success), var(--primary-light));
        color: white;
    }

    .chore-item.approved {
        opacity: 0.8;
        background: var(--success);
        color: white;
    }

    .chore-item .chore-details{
        font-size: 12px;
    }

.chore-checkbox input {
    width: 24px;
    height: 24px;
    margin-right: 0.75rem;
    cursor: pointer;
}

/* Progress Bar */
.progress-bar {
    background: var(--border);
    height: 24px;
    border-radius: 12px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    background: linear-gradient(90deg, var(--success), var(--primary-light));
    height: 100%;
    transition: width 0.5s ease;
}

.progress-fill-complete {
    background: var(--success);
    height: 100%;
    transition: width 0.5s ease;
}

/* Messages */
.success-message {
    background: var(--success);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.error-message {
    background: var(--danger);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Completion celebration */
.completion-message {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--success), var(--primary-light));
    color: white;
    border-radius: 12px;
    margin: 1rem 0;
    animation: celebrate 0.5s ease;
}

    .completion-message.all-approved {
        background: var(--success);
    }

@keyframes celebrate {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Dashboard Tiles */
.dashboard-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.tile {
    position: relative;
    background: var(--primary);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    overflow: hidden;
    transition: all 0.3s ease;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

    .tile:hover {
        transform: scale(1.05);
        box-shadow: var(--shadow-lg);
    }

.tile-large {
    grid-column: span 2;
    min-height: 180px;
}

.tile-secondary {
    background: var(--secondary);
}

.tile-accent {
    background: var(--success);
}

.tile-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.tile-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.tile-info {
    font-size: 0.875rem;
    opacity: 0.9;
}

.tile-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: rgba(255,255,255,0.5);
    transition: width 0.5s ease;
}

/* Responsive */
@media (max-width: 600px) {
    .tile-large {
        grid-column: span 1;
    }
}

.day-pill {
    padding: 0.5rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    background: white;
    color: #333;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

    .day-pill:hover {
        background: #f5f5f5;
    }

    .day-pill.selected {
        background: #e3f2fd;
        color: #1976d2;
        border-color: #1976d2;
    }

.day-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--surface);
    border-radius: 8px;
}

    .day-section.today {
        border-left: 4px solid var(--primary);
    }

    .day-section h3 {
        margin-bottom: 0.75rem;
        color: var(--text);
    }

.weekly-summary {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--surface);
    border-radius: 8px;
}

.date-navigation {
    display: flex;
    justify-content: start;
    align-items: center;
    gap: 0.5rem;
}
    .date-navigation .date-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        /*min-width: 150px;*/
    }

        .date-navigation .date-info .top {
            font-size: 1.2rem;
        }

        .date-navigation .date-info .bottom {
            font-size: 0.8rem;
        }

.family-section {
    margin: 2rem 0;
}

    .family-section h4 {
        margin-bottom: 1rem;
        font-size: 1.25rem;
    }

.members-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.member-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
}

.member-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.member-icon {
    font-size: 2rem;
}

.member-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.member-name {
    font-weight: 600;
    font-size: 1rem;
}

.member-email {
    font-size: 0.875rem;
    color: #666;
}

.empty-message {
    color: #666;
    font-style: italic;
    margin-bottom: 1rem;
}

.chores-grid {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

.chore-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
}

    .chore-card:hover {
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

.chore-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

    .chore-header .main {
        display: flex;
        justify-content: space-between;
        align-items: start;
        flex: 1 0 100%;
        gap: 1rem; /* Add spacing between title and buttons */
    }

        .chore-header .main h3 {
            margin: 0;
            font-size: 1.25rem;
            color: #333;
            margin-top: -20px;
            flex: 1; /* Allow title to grow */
            overflow-wrap: break-word; /* Break long words */
            word-break: break-word;
        }

        .chore-header .main .chore-actions {
            display: flex;
            gap: 0.5rem;
            flex-shrink: 0;
            margin-top: -22px;
            margin-right: -21px;
        }

    .chore-header .sub {
        flex: 1 0 100%;
    }

.chore-schedule {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.day-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 500;
}

.child-assignments {
    margin-top: 1rem;
}

    .child-assignments h4 {
        margin: 0 0 0.75rem 0;
        font-size: 0.95rem;
        color: #666;
        font-weight: 600;
    }

.children-list {
    display: flex;
    flex-direction: column;
    gap: 0rem;
}

.child-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

    .child-checkbox:hover {
        background: #f5f5f5;
    }

    .child-checkbox input[type="checkbox"] {
        width: 18px;
        height: 18px;
        cursor: pointer;
    }

    .child-checkbox span {
        font-size: 1rem;
        color: #333;
        margin-top: -13px;
    }

.empty-state {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}
