/* =====================
   IOV Studio - Common Styles
   공통 스타일 (커서, 로더, 유틸리티)
   ===================== */

/* =====================
   Page Loader / Spinner
   ===================== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #6bfc55;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* =====================
   Custom Cursor
   ===================== */
.cursor {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99999;
    mix-blend-mode: difference;
}

.cursor__dot {
    width: 8px;
    height: 8px;
    background: #6bfc55;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background 0.2s;
}

.cursor__circle {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(107, 252, 85, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s;
}

.cursor.hover .cursor__dot {
    width: 12px;
    height: 12px;
    background: #fff;
}

.cursor.hover .cursor__circle {
    width: 60px;
    height: 60px;
    border-color: rgba(255, 255, 255, 0.8);
}

.cursor.click .cursor__dot {
    transform: translate(-50%, -50%) scale(0.8);
}

.cursor.click .cursor__circle {
    transform: translate(-50%, -50%) scale(0.9);
}

/* Hide cursor on touch devices and mobile */
@media (pointer: coarse), (max-width: 768px) {
    .cursor {
        display: none !important;
    }
}

/* Hide default cursor on desktop */
body {
    cursor: none;
}

a,
button,
input,
select,
textarea,
[role="button"],
.sliderCard,
.workCard,
.creatorCard,
.newsCard,
.form__submit,
.form__addPlatform,
.nav__item,
.header__btn,
.saasBtn,
.contactTabs__tab,
.creatorsGrid__filter {
    cursor: none;
}

/* Restore default cursor on touch/mobile devices */
@media (pointer: coarse), (max-width: 768px) {
    body,
    a,
    button,
    input,
    select,
    textarea,
    [role="button"] {
        cursor: auto;
    }
}

/* =====================
   Toast Notifications
   ===================== */
.toast {
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    padding: 1.5rem 2.5rem;
    background: #1a1a1a;
    border: 1px solid rgba(107, 252, 85, 0.3);
    border-radius: 1rem;
    color: #fff;
    font-size: 1.4rem;
    z-index: 100000;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.active {
    transform: translateY(0);
    opacity: 1;
}

.toast.error {
    border-color: rgba(255, 82, 82, 0.5);
    background: rgba(255, 82, 82, 0.1);
}

.toast.success {
    border-color: rgba(107, 252, 85, 0.5);
    background: rgba(107, 252, 85, 0.1);
}

/* =====================
   Cookie Banner
   ===================== */
.cookieBox {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    max-width: 50rem;
    padding: 2rem;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    transform: translateY(150%);
    transition: transform 0.5s ease;
}

.cookieBox.show {
    transform: translateY(0);
}

.cookieBox p {
    font-size: 1.3rem;
    opacity: 0.8;
}

.cookieBox span {
    padding: 1rem 2rem;
    background: #6bfc55;
    color: #000;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.cookieBox span:hover {
    background: #5ae048;
}

/* =====================
   Utility Classes
   ===================== */
.u-hideMobile {
    display: block;
}

.u-showMobile {
    display: none;
}

@media (max-width: 768px) {
    .u-hideMobile {
        display: none;
    }

    .u-showMobile {
        display: block;
    }
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =====================
   Form Styles (Common)
   ===================== */
.form__success {
    text-align: center;
    padding: 4rem 2rem;
}

.form__success h2 {
    color: #6bfc55;
    font-size: 2.4rem;
    margin-bottom: 1rem;
}

.form__success p {
    opacity: 0.7;
    font-size: 1.4rem;
}

/* =====================
   Mobile Text Overlap Fix
   ===================== */
@media (max-width: 768px) {
    .mediaHeader__heading p {
        height: 4rem !important;
    }
}
