/* ============================================================
   FORMS.CSS - Clean form styles
   ============================================================ */

.form-group {
    margin-bottom: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #000000;
    margin-bottom: 0.3rem;
}

input,
textarea {
    width: 100%;
    padding: 0.5rem 0.7rem;
    font-size: 0.85rem;
    border: 1.5px solid #cccccc;
    border-radius: 6px;
    outline: none;
    background: #ffffff;
    color: #000000;
    resize: none;
    transition: border-color 0.2s ease, opacity 0.3s ease;
    font-family: system-ui, -apple-system, sans-serif;
}

textarea {
    min-height: 60px;
}

input:focus,
textarea:focus {
    border-color: #888888;
}

input:disabled,
textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

input.error,
textarea.error {
    border-color: #cc0000 !important;
}

.field-error {
    display: none;
    font-size: 0.8rem;
    color: #cc0000;
    margin-top: 0.25rem;
    font-weight: 500;
}

.field-error.show {
    display: block;
}

.button-wrapper {
    display: flex;
    justify-content: flex-start;
    padding: 4px 0;
    position: relative;
}

.btn-border {
    display: inline-block;
    padding: 3px;
    border: 2px dotted #000000;
    border-radius: 10px;
    transition: border-color 0.3s ease;
}

button[type="submit"] {
    display: inline-block;
    min-width: 100px;
    padding: 0.25rem 1.2rem;
    font-size: 1.4rem;
    font-family: 'CustomTitle', system-ui, -apple-system, sans-serif;
    font-weight: 600;
    color: #000000;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-transform: lowercase;
    letter-spacing: 0.03em;
    line-height: 1.2;
    transition: color 0.3s ease;
}

button[type="submit"]:disabled {
    cursor: not-allowed;
}

.popup .btn-border {
    padding: 3px;
    border: 2px dotted #000000;
    border-radius: 10px;
}

.popup .btn-border button {
    min-width: 100px;
    padding: 0.2rem 1rem;
    font-size: 1.2rem;
    color: #000000;
    font-family: 'CustomTitle', system-ui, -apple-system, sans-serif;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-transform: lowercase;
    letter-spacing: 0.03em;
    transition: color 0.3s ease;
}

.star-burst-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
    overflow: visible;
}

.star {
    position: absolute;
    font-size: 10px;
    font-weight: bold;
    animation: starExplode 1.2s ease-out forwards;
    pointer-events: none;
}

@keyframes starExplode {
    0% {
        transform: translate(0, 0) scale(0.3) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(1) rotate(360deg);
        opacity: 0;
    }
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.popup-overlay.active {
    display: flex;
}

.popup {
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    max-width: 420px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999999;
    background: none;
    border: none;
    font-family: system-ui, -apple-system, sans-serif;
}

.popup-close:hover {
    color: #000000;
}

.popup h2 {
    font-family: 'CustomTitle', system-ui, -apple-system, sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #000000;
    text-transform: lowercase;
    margin-bottom: 0.5rem;
    text-align: center;
}

.popup p {
    color: #666666;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.popup .form-group {
    margin-bottom: 1rem;
}

.popup label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #000000;
}

.popup input {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    font-family: system-ui, -apple-system, sans-serif;
}

.popup .popup-error {
    display: none;
    color: #cc0000;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    text-align: center;
}

.popup .popup-error.show {
    display: block;
}

.popup .popup-success {
    display: none;
    color: #00cc44;
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
}

.popup .popup-success.show {
    display: block;
}

@media (max-width: 480px) {
    button[type="submit"] {
        min-width: 80px;
        padding: 0.2rem 1rem;
        font-size: 1.2rem;
    }
    .btn-border {
        padding: 2px;
    }
    .popup .btn-border button {
        min-width: 80px;
        font-size: 1.2rem;
    }
    input,
    textarea {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    textarea {
        min-height: 50px;
    }
}
