/* Custom Login & Sign Up Button Styles */
/* Font Poppins will be loaded from Google Fonts */

.custom-login-container {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'Poppins', sans-serif;
}

/* Login Button (Masuk) */
.login-button {
    background-color: transparent;
    border: 1px solid #055F6A;
    color: #055F6A;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.login-button:hover {
    background-color: #055F6A;
    color: #ffffff;
}

/* Daftar Button */
.daftar-button {
    background-color: #055F6A;
    color: #ffffff;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-block;
}

.daftar-button:hover {
    background-color: #044d56;
    color: #ffffff;
    text-decoration: none;
}

/* Profile Dropdown Container */
.custom-login-container.logged-in {
    position: relative;
}

.user-profile-dropdown {
    position: relative;
    display: inline-block;
}

/* Profile Button */
.profile-button {
    background-color: #055F6A;
    color: #ffffff;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.profile-button:hover {
    background-color: #044d56;
}

.profile-button svg {
    flex-shrink: 0;
}

.profile-button .dropdown-arrow {
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.user-profile-dropdown:hover .dropdown-arrow,
.dropdown-menu.show ~ .profile-button .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown Items */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #055F6A;
}

.dropdown-item svg {
    flex-shrink: 0;
}

/* Logout Item Special Styling */
.dropdown-item.logout-item {
    border-top: 1px solid #e0e0e0;
    border-bottom: none;
    margin-top: 4px;
}

.dropdown-item.logout-item:hover {
    background-color: #fff5f5;
    color: #dc3545;
}

.dropdown-item.logout-item:hover svg path {
    stroke: #dc3545;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .custom-login-container {
        gap: 8px;
    }
    
    .login-button,
    .daftar-button,
    .profile-button {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .dropdown-menu {
        min-width: 180px;
    }
    
    .dropdown-item {
        padding: 12px 16px;
        font-size: 13px;
    }
}

@media screen and (max-width: 480px) {
    .custom-login-container {
        gap: 6px;
    }
    
    .login-button,
    .daftar-button,
    .profile-button {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .profile-button span {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Custom Login Modal */
.custom-login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.custom-login-modal {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.custom-login-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    z-index: 10;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    font-weight: 300;
}

.custom-login-modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.custom-login-modal-content {
    width: 100%;
    height: 100%;
    max-height: 90vh;
    overflow: auto;
}

.custom-login-modal-content iframe {
    width: 100%;
    min-height: 500px;
    height: 100%;
    border: none;
    display: block;
}

/* Loading Spinner */
.custom-login-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    min-height: 300px;
}

.custom-login-loading .spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #055F6A;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.custom-login-loading p {
    color: #666;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    margin: 0;
}

/* Error Message */
.custom-login-error {
    padding: 40px 20px;
    text-align: center;
}

.custom-login-error p {
    color: #666;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    margin: 0;
}

.custom-login-error a {
    color: #055F6A;
    text-decoration: none;
    font-weight: 500;
}

.custom-login-error a:hover {
    text-decoration: underline;
}

/* Mobile Responsive for Modal */
@media screen and (max-width: 768px) {
    .custom-login-modal {
        max-width: 95%;
        max-height: 85vh;
    }
}

@media screen and (max-width: 480px) {
    .custom-login-modal-overlay {
        padding: 10px;
    }
    
    .custom-login-modal {
        max-width: 100%;
        max-height: 90vh;
        border-radius: 6px;
    }
    
    .custom-login-modal-close {
        top: 10px;
        right: 10px;
        font-size: 28px;
        width: 30px;
        height: 30px;
    }
}