/* https://picocss.com/docs/css-variables */
/*
[disabled] {
  --pico-form-element-background-color: rgba(170, 170, 170, 0.25);
}
*/

[disabled] {
--pico-form-element-disabled-opacity: 0.3;
opacity: var(--pico-form-element-disabled-opacity);
}

table.striped th:first-child,
table.striped td:first-child {
    width: 300px; /* Adjust this value as needed */
    min-width: 100px;
    max-width: 300px;
}

table.striped th:nth-child(3),
table.striped td:nth-child(3) {
    width: 150px; /* Adjust this value as needed */
    min-width: 100px;
    max-width: 150px;
}
table.striped th:nth-child(4),
table.striped td:nth-child(4) {
    width: 180px; /* Adjust this value as needed */
    min-width: 180px;
    max-width: 180px;
}

table.striped td:nth-child(4) .btn-deallocate {
    width: 7rem;
}

table.striped td:nth-child(4) .btn-allocate {
    width: 7rem;
}

table.striped th:nth-child(5),
table.striped td:nth-child(5) {
    width: 80px; /* Adjust this value as needed */
    min-width: 80px;
    max-width: 80px;
}

/* Mobile table column adjustments */
@media (max-width: 768px) {
    table.striped th:first-child,
    table.striped td:first-child {
        width: 100px; /* Adjust this value as needed */
        min-width: 100px;
        max-width: 100px;
                padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

        table.striped th:nth-child(2),
    table.striped td:nth-child(2) {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }


    table.striped th:nth-child(3),
    table.striped td:nth-child(3) {
        width: 30px;
        min-width: 30px;
        max-width: 100px;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    table.striped th:nth-child(4),
    table.striped td:nth-child(4) {
        width: 90px; /* Adjust this value as needed */
        min-width: 90px;
        max-width: 180px;
                padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    
    table.striped th:nth-child(5),
    table.striped td:nth-child(5) {
        width: 10px;
        min-width: 10px;
        max-width: 60px;
        padding-left: 0.25rem;
        padding-right: 0.35rem;
    }
}

.btn-deallocate {
    padding-block: 0.45rem;
    height: auto;
    --pico-secondary-background: #d81b60;
    --pico-secondary-hover-background: #c2185b; /* slightly darker for hover */
    --pico-secondary-border: #d81b60;
    --pico-secondary-hover-border: #c2185b;
}

/* Spinner for loading states */
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}
.spinner.hidden {
    display: none;
}
.hidden {
    display: none !important;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Vertical separator for registration form columns */
@media (min-width: 768px) {
    .register-grid > div:first-child {
        padding-top: 1rem;
        padding-left: 1rem;
        padding-right: 2rem;
        border-right: 1px solid var(--pico-muted-border-color);
    }
    .register-grid > div:last-child {
        padding-top: 1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .register-grid {
         padding-bottom: 1rem;
    }

    /* Registration page header */
    article > header:has(+ form[action*="register"]) {
        padding-top: 2rem;
        padding-left: 2rem;
    }

    .register-footer {
        padding-left: 2rem;
    }

    .register-submit-btn-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

.register-footer {
    padding-top: 1.5rem;
}

/* Registration message styling */
.registration-message {
    display: none;
    background-color: #ef444433;
    color: #ef4444;
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    margin-left: 1rem;
    margin-right: 1rem;
    margin-bottom: 1rem;
}

/* Registration message mobile adjustments */
@media (max-width: 768px) {
    .registration-message {
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    #userFeaturesRowOne .grid > div,
    #userFeaturesRowTwo .grid > div {
        margin-bottom: 0.5rem;
    }
    #userFeaturesRowOne .grid,
    #userFeaturesRowTwo .grid {
        row-gap: 0.5rem;
    }
    #userFeaturesRowOne label,
    #userFeaturesRowTwo label {
        margin-bottom: 0.25rem;
    }
    #userFeaturesRowOne select,
    #userFeaturesRowTwo select {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    #userFeaturesRowOne .grid > div,
    #userFeaturesRowTwo .grid > div {
        margin-bottom: 0.5rem;
    }
    #userFeaturesRowOne .grid,
    #userFeaturesRowTwo .grid {
        row-gap: 0.5rem;
    }
    #userFeaturesRowOne label,
    #userFeaturesRowTwo label {
        margin-bottom: 0.25rem;
    }
    #userFeaturesRowOne select,
    #userFeaturesRowTwo select {
        margin-bottom: 0;
    }

    /* Objective Targets - compact mobile spacing */
    #goals .grid {
        row-gap: 0.5rem;
    }
    #goals .grid > label {
        margin-bottom: 0.25rem;
    }
    #goals .grid input[type="range"] {
        margin-bottom: 0;
    }
}