/* FloorFlow eBook Lead Magnet Styles */

/* Utility Classes */
.floorflow-ebook-hidden {
    display: none !important;
}

/* Container */
#floorflow-ebook-container {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999999;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Minimized Button - Updated to be smaller */
#floorflow-ebook-button {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: #E6AF5D;
    color: #30373F;
    padding: 8px 6px;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000000;
    writing-mode: vertical-lr;
    text-orientation: mixed;
}

#floorflow-ebook-button:hover {
    background: #d49d4a;
    transform: translateY(-50%) translateX(2px);
}

.floorflow-ebook-button-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#floorflow-ebook-button span {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: #ffffff;
    writing-mode: vertical-lr;
    text-orientation: mixed;
    white-space: nowrap;
}

/* Overlay */
#floorflow-ebook-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#floorflow-ebook-overlay.floorflow-show {
    opacity: 1;
}

/* Slide-out Window */
#floorflow-ebook-slideout {
    position: fixed;
    left: -450px;
    top: 50%;
    transform: translateY(-50%);
    width: 420px;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 0 8px 8px 0;
    box-shadow: 4px 0 25px rgba(0,0,0,0.15);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999999;
    overflow: hidden;
}

#floorflow-ebook-slideout.floorflow-show {
    left: 0;
}

.floorflow-ebook-content {
    position: relative;
    padding: 30px 25px;
    height: 100%;
    overflow-y: auto;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.floorflow-ebook-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    z-index: 10;
    display: flex;           /* Add this */
    align-items: center;     /* Add this */
    justify-content: center; /* Add this */
}

.floorflow-ebook-close:hover {
    background-color: rgba(48, 55, 63, 0.1);
}

.floorflow-ebook-close svg {
    color: #30373F;
}

/* eBook Cover */
.floorflow-ebook-cover {
    text-align: center;
    margin-bottom: 20px;
}

.floorflow-ebook-cover img {
    width: 120px;
    height: auto;
    border-radius: 0px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Content */
.floorflow-ebook-text h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
    color: #30373F;
    text-align: center;
    line-height: 1.2;
}

.floorflow-ebook-subtitle {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #666;
    text-align: center;
    line-height: 1.4;
}

/* Benefits List */
.floorflow-ebook-benefits {
    margin: 0 0 25px 0;
    padding: 0;
    list-style: none;
}

.floorflow-ebook-benefits li {
    position: relative;
    padding: 6px 0 6px 24px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #30373F;
    line-height: 1.4;
}

.floorflow-ebook-benefits li:before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 6px;
    color: #E6AF5D;
    font-weight: bold;
    font-size: 16px;
}

/* Form Styles */
.floorflow-ebook-form {
    margin-bottom: 20px;
}

.floorflow-form-group {
    margin-bottom: 15px;
}

.floorflow-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    color: #30373F;
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.floorflow-form-group input:focus {
    outline: none;
    border-color: #E6AF5D;
    box-shadow: 0 0 0 3px rgba(230, 175, 93, 0.1);
}

.floorflow-form-group input::placeholder {
    color: #9ca3af;
}

/* Submit Button */
.floorflow-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #E6AF5D 0%, #d49d4a 100%);
    color: #30373F;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.floorflow-submit-btn:hover {
    background: linear-gradient(135deg, #d49d4a 0%, #c8913e 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(230, 175, 93, 0.3);
}

.floorflow-submit-btn:active {
    transform: translateY(0);
}

.floorflow-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Privacy Text */
.floorflow-privacy {
    margin: 12px 0 0 0;
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    line-height: 1.4;
}

/* Success Message */
.floorflow-success {
    text-align: center;
    padding: 20px;
    background: #f0fdf4;
    border: 2px solid #bbf7d0;
    border-radius: 12px;
    margin-top: 20px;
}

.floorflow-success-icon {
    margin-bottom: 12px;
}

.floorflow-success h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #065f46;
}

.floorflow-success p {
    margin: 0;
    font-size: 14px;
    color: #047857;
    line-height: 1.4;
}

/* Error Message */
.floorflow-error {
    background: #fef2f2;
    border: 2px solid #fecaca;
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
}

.floorflow-error p {
    margin: 0;
    font-size: 14px;
    color: #dc2626;
    text-align: center;
}

/* Loading State */
.floorflow-submit-btn.loading .floorflow-btn-text {
    display: none;
}

.floorflow-submit-btn.loading .floorflow-btn-loading {
    display: inline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #floorflow-ebook-slideout {
        width: 100%;
        max-width: 100%;
        left: -100%;
        top: 0;
        transform: none;
        height: 100%;
        border-radius: 0;
    }
    
    #floorflow-ebook-slideout.floorflow-show {
        left: 0;
    }
    
    .floorflow-ebook-content {
        padding: 20px;
        height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    .floorflow-ebook-text h3 {
        font-size: 20px;
    }
    
    #floorflow-ebook-button {
        left: 0;
        top: 40%;
        padding: 8px 5px;
    }
    
    #floorflow-ebook-button span {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .floorflow-ebook-content {
        padding: 15px;
    }
    
    .floorflow-ebook-text h3 {
        font-size: 18px;
    }
    
    .floorflow-ebook-benefits li {
        font-size: 13px;
    }
    
    .floorflow-form-group input {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .floorflow-submit-btn {
        padding: 10px 14px;
        font-size: 14px;
        min-height: 42px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #floorflow-ebook-button {
        border: 2px solid #30373F;
    }
    
    .floorflow-form-group input {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    #floorflow-ebook-slideout,
    #floorflow-ebook-overlay,
    #floorflow-ebook-button,
    .floorflow-submit-btn {
        transition: none;
    }
}

/* Print styles */
@media print {
    #floorflow-ebook-container {
        display: none !important;
    }
}