/**
 * AdManager Signup Modal Component Styles
 * @version 2.0.0
 * @author AdManager Team
 * Exact Figma implementation
 */

:root {
    --adm-signup-primary-color: #f11f68;
    --adm-signup-secondary-color: #162abf;
    --adm-signup-text-primary: #262626; /* Base/Black from Figma */
    --adm-signup-text-secondary: #344054; /* Dark Blue/800 from Figma */
    --adm-signup-text-placeholder: #98a2b3; /* Print-400 from Figma */
    --adm-signup-border-color: #d0d5dd;
    --adm-signup-gray-color: #b3b2b6; /* Dark/Gray from Figma */
    --adm-signup-gray-border: #e8e8e8;
    --adm-signup-overlay-bg: rgba(0, 0, 0, 0.25);
    --adm-signup-shadow: 0px 20px 24px -4px rgba(10, 13, 18, 0.1), 0px 8px 8px -4px rgba(10, 13, 18, 0.04);
    --adm-signup-font-family: "Switzer", system-ui, -apple-system, sans-serif;
}

/* Remove all browser default focus styles within signup modal */
.admanager-signup-overlay *:focus {
    outline: none !important;
    box-shadow: none !important;
}

.admanager-signup-overlay input:focus,
.admanager-signup-overlay select:focus,
.admanager-signup-overlay button:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Main overlay */
.admanager-signup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--adm-signup-overlay-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    padding: 20px;
    animation: adm-signup-fadeIn 0.3s ease-out;
}

/* Prevent body scrolling when modal is open */
body.admanager-signup-modal-open {
    overflow: hidden !important;
}

@keyframes adm-signup-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Main container - matches Figma rounded-2xl and shadow */
.admanager-signup-container {
    background: #ffffff;
    border-radius: 16px; /* rounded-2xl */
    width: 100%;
    max-width: 900px;
    overflow: hidden;
    box-shadow: var(--adm-signup-shadow);
    position: relative;
    animation: adm-signup-slideIn 0.4s ease-out;
    z-index: 1000000;
}

@keyframes adm-signup-slideIn {
    from { 
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to { 
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Content wrapper */
.admanager-signup-content {
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: flex-start;
    width: 900px; /* Fixed width from Figma */
}

/* Inner content container */
.admanager-signup-inner-content {
    display: flex;
    flex-direction: column;
    gap: 20px; /* gap-5 from Figma */
    align-items: center;
    justify-content: flex-start;
    padding: 0 0 0 40px; /* pl-10 from Figma */
    width: 100%;
}

/* Main content area */
.admanager-signup-main {
    display: flex;
    flex-direction: row;
    gap: 40px; /* gap-10 from Figma */
    align-items: flex-start;
    justify-content: center;
    width: 100%;
}

/* Form section */
.admanager-signup-form-section {
    display: flex;
    flex-direction: column;
    gap: 24px; /* gap-6 from Figma */
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0 0 40px 0; /* pb-10 from Figma */
    width: 400px; /* Fixed width from Figma */
    flex-shrink: 0;
}

/* Header section with exact Figma padding and background */
.admanager-signup-header {
    background: #fffeff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 0 0 0; /* pt-10 from Figma */
    width: 100%;
    flex-shrink: 0;
}

.admanager-signup-text-content {
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 16px; /* gap-4 from Figma */
    align-items: flex-start;
    justify-content: center;
    padding: 0;
    width: 100%;
    flex-shrink: 0;
}

/* Title - exact Figma specs: Switzer Semibold, 24px, line-height 32px */
.admanager-signup-title {
    font-family: "Switzer", sans-serif;
    font-weight: 600; /* Semibold */
    font-size: 24px;
    line-height: 32px;
    color: var(--adm-signup-text-primary);
    margin: 0;
    width: 100%;
    flex-shrink: 0;
}

/* Message container */
.admanager-signup-message {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    display: none;
    font-family: var(--adm-signup-font-family);
}

.admanager-signup-message.error {
    background-color: #fef2f2;
    border: 1px solid #fca5a5;
    color: #dc2626;
}

.admanager-signup-message.success {
    background-color: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

/* Form container */
.admanager-signup-form-container {
    display: flex;
    flex-direction: column;
    gap: 10px; /* gap-2.5 from Figma */
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0;
    width: 100%;
    flex-shrink: 0;
}

.admanager-signup-form {
    display: flex;
    flex-direction: column;
    gap: 32px; /* gap-8 from Figma */
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0;
    width: 100%;
    flex-shrink: 0;
}

/* Social login section */
.admanager-signup-social-section {
    display: flex;
    flex-direction: column;
    gap: 20px; /* gap-5 from Figma */
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0;
    width: 100%;
    flex-shrink: 0;
}

/* Social buttons row */
.admanager-signup-social-buttons {
    display: flex;
    flex-direction: row;
    gap: 10px; /* gap-2.5 from Figma */
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0;
    width: 100%;
    flex-shrink: 0;
}

/* Social button - simplified to match Figma exactly */
.admanager-signup-social-button {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    height: 40px; /* h-10 from Figma */
    width: 195px; /* Fixed width from Figma */
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
}

.admanager-signup-social-button:hover {
    border-color: #d0d5dd;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.admanager-signup-social-button:active {
    transform: translateY(1px);
}

/* Divider section */
.admanager-signup-divider {
    display: flex;
    flex-direction: row;
    gap: 3px;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 100%;
    flex-shrink: 0;
    margin: 20px 0;
}

.admanager-signup-divider-line {
    flex: 1;
    height: 1px;
    background-color: #e8e8e8;
    flex-shrink: 0;
}

.admanager-signup-divider-text {
    font-family: "Switzer", sans-serif;
    font-weight: 500; /* Medium */
    font-size: 14px;
    line-height: 20px;
    color: #b3b2b6;
    flex-shrink: 0;
    padding: 0 12px;
}

/* Field group */
.admanager-signup-field-group {
    display: flex;
    flex-direction: column;
    gap: 16px; /* gap-4 from Figma */
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0;
    width: 100%;
    flex-shrink: 0;
}

/* Field row for first/last name */
.admanager-signup-field-row {
    display: flex;
    flex-direction: row;
    gap: 16px; /* gap-4 from Figma */
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0;
    width: 100%;
    flex-shrink: 0;
}

/* Field container */
.admanager-signup-field {
    display: flex;
    flex-direction: column;
    gap: 6px; /* gap-1.5 from Figma */
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0;
    width: 100%;
    flex-shrink: 0;
}

.admanager-signup-field.half-width {
    flex: 1 1 0%;
    min-height: 1px;
    min-width: 1px;
}

/* Label - exact Figma specs: Switzer Semibold, 16px, tracking -0.32px */
.admanager-signup-label {
    font-family: "Switzer", sans-serif;
    font-weight: 600; /* Semibold */
    font-size: 16px;
    line-height: normal;
    letter-spacing: -0.32px;
    color: #344054; /* Print-600 from Figma */
    margin: 0;
    width: 100%;
    flex-shrink: 0;
}

/* Input container */
.admanager-signup-input-container {
    display: flex;
    flex-direction: column;
    gap: 8px; /* gap-2 from Figma */
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0;
    width: 100%;
    flex-shrink: 0;
}

/* Input field - exact Figma specs */
.admanager-signup-input-wrapper {
    background: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    padding: 6px 12px; /* px-3 py-1.5 from Figma */
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.admanager-signup-input-wrapper:focus-within {
    border-color: #f11f68;
    box-shadow: 0 0 0 3px rgba(241, 31, 104, 0.1);
    outline: none;
}

.admanager-signup-input {
    flex: 1;
    min-height: 24px; /* line-height from Figma */
    font-family: "Switzer", sans-serif;
    font-weight: 400; /* Regular */
    font-size: 16px;
    line-height: 24px;
    color: #262626;
    border: none;
    outline: none;
    background: transparent;
    padding: 0;
    box-shadow: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.admanager-signup-input:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

.admanager-signup-input::placeholder {
    color: #98a2b3;
    font-family: "Switzer", sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
}

/* Select dropdown */
.admanager-signup-select {
    flex: 1;
    min-height: 24px;
    font-family: "Switzer", sans-serif;
    font-weight: 400; /* Regular */
    font-size: 16px;
    line-height: 24px;
    color: #262626;
    border: none;
    outline: none;
    background: transparent;
    appearance: none;
    padding: 0;
    cursor: pointer;
    box-shadow: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.admanager-signup-select:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

.admanager-signup-select option {
    color: #262626;
}

.admanager-signup-select:invalid {
    color: #98a2b3;
}

/* Input icons */
.admanager-signup-input-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    color: #98a2b3;
    transition: color 0.2s ease;
}

.admanager-signup-input-icon:hover {
    color: #344054;
}

.admanager-signup-input-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Submit button - exact Figma gradient and styling */
.admanager-signup-submit {
    background: linear-gradient(to right, var(--adm-signup-primary-color), var(--adm-signup-secondary-color));
    border: none;
    border-radius: 8px; /* rounded from Figma */
    padding: 10px 16px; /* px-4 py-2.5 from Figma */
    width: 100%;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: row;
    gap: 6px; /* gap-1.5 from Figma */
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admanager-signup-submit::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: 0px 0px 0px 1px inset rgba(16, 24, 40, 0.18), 0px -2px 0px 0px inset rgba(16, 24, 40, 0.05);
}

.admanager-signup-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(241, 31, 104, 0.4);
}

.admanager-signup-submit:active {
    transform: translateY(0);
}

.admanager-signup-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Submit button content */
.admanager-signup-submit-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 2px 0; /* px-0.5 py-0 from Figma */
    flex-shrink: 0;
}

/* Submit text - exact Figma specs: Switzer Semibold, 16px, line-height 24px */
.admanager-signup-submit-content span {
    font-family: "Switzer", sans-serif;
    font-weight: 600; /* Semibold */
    font-size: 16px;
    line-height: 24px;
    color: #ffffff;
    white-space: pre;
}

/* Spinner */
.admanager-signup-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: adm-signup-spin 1s linear infinite;
    display: none;
}

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

/* Login section - exact Figma layout */
.admanager-signup-login-section {
    display: flex;
    flex-direction: column;
    gap: 24px; /* gap-6 from Figma */
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0;
    width: 100%;
    flex-shrink: 0;
}

.admanager-signup-login {
    display: flex;
    flex-direction: column;
    gap: 6px; /* gap-1.5 from Figma */
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0;
    width: 100%;
    flex-shrink: 0;
}

.admanager-signup-login-row {
    display: flex;
    flex-direction: row;
    gap: 6px; /* gap-1.5 from Figma */
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    width: 100%;
    flex-shrink: 0;
}

.admanager-signup-login-text {
    display: flex;
    flex-direction: row;
    gap: 10px; /* gap-2.5 from Figma */
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    flex-shrink: 0;
}

/* Login text - exact Figma specs: Switzer Medium, 14px, line-height 22px */
.admanager-signup-login-text span {
    font-family: "Switzer", sans-serif;
    font-weight: 500; /* Medium */
    font-size: 14px;
    line-height: 22px;
    color: var(--adm-signup-text-secondary);
    white-space: pre;
}

.admanager-signup-login-link {
    display: flex;
    flex-direction: row;
    gap: 10px; /* gap-2.5 from Figma */
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    flex-shrink: 0;
}

/* Login link - exact Figma specs: Switzer Medium, 14px, line-height 22px */
.admanager-signup-login-link a {
    font-family: "Switzer", sans-serif;
    font-weight: 500; /* Medium */
    font-size: 14px;
    line-height: 22px;
    color: var(--adm-signup-primary-color);
    text-decoration: none;
    white-space: pre;
}

.admanager-signup-login-link a:hover {
    text-decoration: underline;
}

/* Hero section - exact Figma dimensions */
.admanager-signup-hero-section {
    flex: 1 1 0%;
    min-height: 1px;
    min-width: 1px;
    height: 808px; /* Fixed height from Figma */
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.admanager-signup-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

/* Close button - exact Figma positioning */
.admanager-signup-close {
    position: absolute;
    left: 372px; /* Exact left position from Figma */
    top: 24px; /* Exact top position from Figma */
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    color: var(--adm-signup-text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000001;
    padding: 0;
    transition: color 0.2s ease;
    overflow: hidden;
}

.admanager-signup-close:hover {
    color: #000000;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admanager-signup-content {
        width: 100%;
    }
    
    .admanager-signup-main {
        flex-direction: column;
        gap: 20px;
    }
    
    .admanager-signup-hero-section {
        width: 100%;
        height: 200px;
        order: -1;
    }
    
    .admanager-signup-form-section {
        width: 100%;
        padding: 24px;
        gap: 20px;
    }
    
    .admanager-signup-inner-content {
        padding: 16px;
    }
    
    .admanager-signup-close {
        left: auto;
        right: 16px;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 50%;
        width: 32px;
        height: 32px;
    }
    
    .admanager-signup-header {
        padding-top: 20px;
    }
    
    .admanager-signup-field-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .admanager-signup-field.half-width {
        width: 100%;
    }
    
    .admanager-signup-social-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .admanager-signup-social-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .admanager-signup-social-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .admanager-signup-form-section {
        padding: 20px;
        gap: 16px;
    }
    
    .admanager-signup-hero-section {
        height: 160px;
    }
    
    .admanager-signup-inner-content {
        padding: 12px;
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    .admanager-signup-overlay {
        align-items: flex-start;
        padding: 8px;
        overflow-y: auto;
    }
    
    .admanager-signup-container {
        max-height: none;
        margin: 8px 0;
    }
    
    .admanager-signup-hero-section {
        height: 120px;
        min-height: 120px;
    }
    
    .admanager-signup-form-section {
        padding: 16px;
        gap: 12px;
    }
    
    .admanager-signup-title {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .admanager-signup-field {
        margin-bottom: 12px;
    }
    
    .admanager-signup-submit {
        margin: 16px 0 12px 0;
        padding: 12px 24px;
    }
}

/* Animation for modal appearance */
.admanager-signup-modal.show {
    display: block;
}

.admanager-signup-modal.show .admanager-signup-overlay {
    animation: fadeIn 0.3s ease-out;
}

.admanager-signup-modal.show .admanager-signup-container {
    animation: slideIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to { 
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
