/* ============8=============================================================
   FORMS - Input fields, labels, checkboxes
   ========================================================================== */

/* Form Structure */
.tab-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row.equal-cols {
    flex-direction: row;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.footnote{
    color: #aaa;
    font-size:0.85rem;
    margin-bottom:0;
}
.form-group .footnote{
    display:inline-block;
    margin-left:0.2rem;
    transform: translateY(-0.7rem)
}

/* Input Fields */
input {
    background: none;
    border: none;
    border-bottom: 1px solid #555;
    color: #eee;
    padding: 0.5rem 0;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}
    input:disabled {
        color: #eee;
        border-bottom: 1px dashed #555;
    }

input:focus {
    outline: none;
    border-bottom-color: #e74c3c;
}

input::placeholder {
    color: #666;
}

textarea {
    width: 100%;
    resize: none;
    overflow: auto;
    padding: 1rem;
    border-radius: 1rem;
    background: #55555511;
    border: #666 solid 1px;
    font-size: 1rem;
    max-height: 20rem;
    transition: max-height 0.5s ease, opacity 0.5s ease;
}
    textarea:focus {
        border-bottom: #e74c3c solid 1px;
        outline: none;
        box-shadow: 0 0 10px 2px #e74c3c33;
    }

.optional-section {
    transition: max-height 0.5s ease, opacity 0.5s ease;
    max-height: 200rem
}
    .optional-section.hidden {
        max-height: 0;
        padding: 0;
        margin: 0;
        display:inline-block;
        width:100%;
        opacity: 0;
        pointer-events: none;
        overflow: hidden;
        white-space: nowrap;
        transition: max-height 0.5s ease, opacity 0.5s ease;
    }
.disabled{
    pointer-events:none;
}
/* Input with Icon/Button */
.ico-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ico-input input {
    flex: 1;
    border: none;
    border-bottom: 1px solid #555;
    background: none;
    color: #eee;
    padding: 0.35rem 0;
}

.ico-input button {
    background: #e74c3c;
    margin: 0 0.5rem;
    font-size: 0.9rem;
    border: solid 1px #e1695d;
    border-radius: 2rem;
    padding: 0.45rem 0.85rem;
    color: white;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ico-input button:hover {
    background: #ff6251;
}

/* Checkboxes */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #eee;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: #e74c3c;
}

.nowrap{
    text-wrap:nowrap;
}
/* Buttons */
.button {
    border: none;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    margin-top: auto;
    transition: background 0.25s ease, transform 0.1s ease;
}
    .button.wide {
        padding-left: 2.5em;
        padding-right: 2.5em;
    }
/* Checkout Button */
.red-btn {
    background: linear-gradient(90deg, #b22222, #ff4d4d);
}

    .red-btn:hover {
        background: linear-gradient(90deg, #d63031, #ff6b6b);
        transform: translateY(-2px);
    }
.gray-btn {
    background: linear-gradient(90deg, #666, #bbb);
}

    .gray-btn:hover {
        background: linear-gradient(90deg, #888, #ccc);
        transform: translateY(-2px);
    }
.gray-btn {
    background: linear-gradient(90deg, #666, #bbb);
}

    .gray-btn:hover {
        background: linear-gradient(90deg, #888, #ccc);
        transform: translateY(-2px);
    }
.green-btn {
    background: linear-gradient(90deg, #588a3d, #72c149);
}

    .green-btn:hover {
        background: linear-gradient(90deg, #6da54e, #7ed154);
        transform: translateY(-2px);
    }

.button-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: white;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    animation: button-spin 0.6s linear infinite;
    vertical-align: middle;
}

@keyframes button-spin {
    to {
        transform: rotate(360deg);
    }
}

button[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row.equal-cols {
        flex-direction: column;
    }

    .ico-input {
        flex-direction: column;
        align-items: stretch;
    }

    .ico-input input {
        width: 100%;
    }

    .ico-input button {
        width: 100%;
        margin: 0.5rem 0 0 0;
    }

    label {
        font-size: 0.85rem;
    }

    input {
        font-size: 0.95rem;
    }
    .red-btn {
        font-size: 1rem;
        padding: 0.85rem;
    }
}

@media (max-width: 480px) {
    .tab-form {
        gap: 1.25rem;
    }

    .form-row {
        gap: 1.25rem;
    }
}