/*  BASE WRAPPER  */
.tartuh-wrapper {
    box-sizing: border-box;
    font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
}

.tartuh-wrapper *,
.tartuh-wrapper *::after,
.tartuh-wrapper *::before {
    box-sizing: border-box;
}

/*  PRELOADER  */
.tartuh-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    opacity: 1;
    transition: opacity 1s ease-out;
    backdrop-filter: blur(5px);
}

.preloader-content {
    width: 250px;
    height: 250px;
    max-width: 90vw;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    animation: scaleUp 1.5s ease-out forwards;
    border-radius: 12px;
    transform: translateZ(0);
}

.preloader-svg {
    width: 100%;
    height: 100%;
    transform: scale(1);
}

.path {
    fill: none;
    stroke: #d90000;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    animation: pathDraw 4s ease-out forwards, pulse 1.5s ease-in-out infinite;
}

@keyframes pathDraw {
    0% {
        stroke-dashoffset: 500;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scaleUp {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/*  SESSION MESSAGES  */
.session-message-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    animation: slideDownOverlay 0.4s ease;
}

.session-message {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 15px 20px;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    animation: slideInMessage 0.5s ease;
    font-size: 16px;
}

@keyframes slideDownOverlay {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes slideInMessage {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/*  PAGE LAYOUT  */
.page-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    padding-left: 5%;
    box-sizing: border-box;
    background-color: #f8f9fa;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
    max-width: 50%;
}

/*  EMAIL INPUT FORM  */
.email-input {
    max-width: 500px;
    width: 100%;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.email-input label {
    display: block;
    margin-bottom: 12px;
    color: #333;
    font-weight: 500;
    font-size: 16px;
}

.email-input p {
    margin: 10px 0;
    color: #666;
    font-size: 14px;
}

.email-input input,
.email-input button {
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
}

.email-input input {
    background-color: #ffffff;
    border: 1px solid #4e4e4e;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.email-input input:focus {
    outline: none;
    border-color: #d90000;
    box-shadow: 0 0 0 2px rgba(217, 0, 0, 0.1);
}

.email-input input::placeholder {
    color: #a0a0a0;
    opacity: 1;
}

.email-input button {
    background-color: #d90000;
    color: white;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    min-height: 48px;
}

.email-input button:hover {
    background-color: #a00000;
}

.email-input button:active {
    background-color: #800000;
    transform: translateY(1px);
}

.email-input button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

/*  DISABLED INPUT STYLE  */
.input-disabled-style {
    background-color: #e0e0e0 !important;
    color: #6b6b6b !important;
    border: 1px solid #ccc !important;
    user-select: none;
    cursor: not-allowed;
}

.input-disabled-style:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: #ccc !important;
}

/*  MESSAGE STYLES  */
.error-message {
    color: #D90000;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    margin-top: 10px;
    display: none;
    animation: fadeIn 0.3s ease;
}

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

.success-message {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    margin-top: 10px;
    display: none;
    animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/*  TERMS AND CONDITIONS  */
.terms {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 15px;
    font-size: 15px;
    color: #4e4e4e;
}

.terms a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.terms a:hover {
    color: #D90000;
}

/*  DISCLAIMER  */
.disclaimer {
    margin-top: 15px;
    padding: 10px;
    font-size: 0.85em;
    color: #666;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    line-height: 1.4;
}

.disclaimer a {
    color: #d90000;
    text-decoration: none;
    transition: text-decoration 0.3s ease;
}

.disclaimer a:hover {
    text-decoration: underline;
}

/*  IMAGE FOOTER  */
.image-footer {
    width: 100%;
    max-width: 500px;
    margin-top: 20px;
    text-align: center;
}

.image-footer img {
    width: 40%;
    height: auto;
    transition: transform 0.3s ease;
}

.image-footer a:hover img {
    transform: scale(1.05);
}

/*  IMAGE CONTAINER (Right side)  */
.image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding-right: 0;
    padding-left: 25px;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 12px 12px 0;
}

/*  LOADER  */
.loader {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    gap: 10px;
}

.loader-text {
    color: #d90000;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
}

.dots {
    display: inline-block;
    min-width: 20px;
    text-align: left;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid #d90000;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/*  RESPONSIVE DESIGN  */

/* Tablet landscape */
@media (max-width: 1024px) {
    .page-container {
        padding-left: 3%;
    }
    
    .content-wrapper {
        max-width: 60%;
    }
    
    .image-container {
        padding-left: 15px;
    }
}

/* Tablet portrait */
@media (max-width: 768px) {
    .page-container {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 10%;
        min-height: auto;
    }
    
    .content-wrapper {
        max-width: 100%;
        margin-bottom: 20px;
    }
    
    .image-container {
        display: none;
    }
    
    .preloader-content {
        width: 180px;
        height: 180px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .page-container {
        padding: 5%;
    }
    
    .email-input {
        padding: 15px;
        margin: 0 10px;
    }
    
    .email-input input,
    .email-input button {
        font-size: 16px;
        padding: 14px;
    }
    
    .session-message {
        font-size: 14px;
        padding: 12px 15px;
    }
    
    .content-wrapper {
        padding: 0 10px;
    }
    
    .preloader-content {
        width: 150px;
        height: 150px;
    }
}

/*  ACCESSIBILITY  */

/* High contrast mode */
@media (prefers-contrast: high) {
    .email-input {
        border: 2px solid #000;
    }
    
    .email-input input {
        border: 2px solid #000;
    }
    
    .email-input button {
        border: 2px solid #000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .path {
        animation: none;
        stroke-dashoffset: 0;
    }
    
    .preloader-content {
        animation: none;
        transform: scale(1);
        opacity: 1;
    }
}

/*  PRINT STYLES  */
@media print {
    .tartuh-preloader,
    .session-message-overlay,
    .image-container {
        display: none !important;
    }
    
    .page-container {
        flex-direction: column;
        height: auto;
        padding: 20px;
    }
    
    .email-input button {
        display: none;
    }
}