/**
 * MYAVANA Free Hair Analysis Styles
 * Beautiful, animated, conversion-optimized design
 */

/* Free Analysis CTA Section */
.myavana-free-analysis-cta {
    position: relative;
    padding: 120px 0;
    background: linear-gradient(135deg, #f5f5f7 0%, #eeece1 100%);
    overflow: hidden;
}

.myavana-free-analysis-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 20% 50%, rgba(231, 166, 144, 0.1) 0%, transparent 50%),
                      radial-gradient(circle at 80% 80%, rgba(74, 77, 104, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.myavana-free-analysis-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.myavana-free-analysis-content {
    position: relative;
    z-index: 2;
}

.myavana-free-analysis-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(231, 166, 144, 0.1);
    border: 2px solid #e7a690;
    border-radius: 50px;
    margin-bottom: 24px;
    animation: pulse 2s ease-in-out infinite;
}

.badge-icon {
    font-size: 20px;
    animation: sparkle 1.5s ease-in-out infinite;
}

.badge-text {
    font-family: 'Archivo', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #e7a690;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.myavana-free-analysis-title {
    font-family: 'Archivo Black', sans-serif;
    font-size: 56px;
    font-weight: 900;
    line-height: 1.1;
    color: #222323;
    margin-bottom: 24px;
}

.gradient-text-animated {
    background: linear-gradient(90deg, #e7a690 0%, #4a4d68 50%, #e7a690 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

.myavana-free-analysis-description {
    font-family: 'Archivo', sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: #4a4d68;
    margin-bottom: 32px;
}

.myavana-free-analysis-features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.feature-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #ffffff;
    border: 2px solid #eeece1;
    border-radius: 50px;
    font-family: 'Archivo', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #222323;
    transition: all 0.3s ease;
}

.feature-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 166, 144, 0.2);
    border-color: #e7a690;
}

.feature-pill i {
    color: #e7a690;
    font-size: 16px;
}

.myavana-free-analysis-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 20px 40px;
    background: linear-gradient(135deg, #e7a690 0%, #d4956f 100%);
    color: #ffffff;
    font-family: 'Archivo Black', sans-serif;
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(231, 166, 144, 0.4);
}

.myavana-free-analysis-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(231, 166, 144, 0.5);
}

.btn-icon {
    font-size: 24px;
}

.btn-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    animation: shine 3s infinite;
}

.myavana-free-analysis-trust {
    display: flex;
    gap: 32px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid #eeece1;
}

.trust-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.trust-number {
    font-family: 'Archivo Black', sans-serif;
    font-size: 32px;
    font-weight: 900;
    color: #e7a690;
    line-height: 1;
    margin-bottom: 4px;
}

.trust-label {
    font-family: 'Archivo', sans-serif;
    font-size: 12px;
    color: #4a4d68;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Visual Preview Card */
.myavana-free-analysis-visual {
    position: relative;
    z-index: 2;
}

.analysis-preview-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    transform: perspective(1000px) rotateY(-5deg);
    transition: all 0.5s ease;
}

.analysis-preview-card:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.preview-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e7a690 0%, #4a4d68 100%);
}

.preview-name {
    font-family: 'Archivo', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #222323;
}

.preview-status {
    font-family: 'Archivo', sans-serif;
    font-size: 12px;
    color: #e7a690;
}

.preview-image {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 16px;
    background: #f5f5f7;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
}

.preview-analysis-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.preview-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #eeece1;
}

.preview-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f5f5f7;
    border-radius: 12px;
}

.result-icon {
    font-size: 20px;
}

.result-text {
    font-family: 'Archivo', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #222323;
}

/* Floating Elements */
.floating-element {
    position: absolute;
    color: #e7a690;
    opacity: 0.3;
    animation: float 3s ease-in-out infinite;
}

.element-1 {
    top: 10%;
    right: 10%;
    font-size: 32px;
    animation-delay: 0s;
}

.element-2 {
    bottom: 20%;
    right: 20%;
    font-size: 24px;
    animation-delay: 1s;
}

.element-3 {
    top: 50%;
    right: 5%;
    font-size: 28px;
    animation-delay: 2s;
}

/* Free Analysis Modal */
.myavana-free-analysis-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.myavana-free-analysis-modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(34, 35, 35, 0.9);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.modal-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.4s ease;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.modal-container.expanded {
    max-width: 900px;
    width: 95%;
}

.modal-container.expanded .results-grid {
    grid-template-columns: repeat(2, 1fr);
}

.modal-container.expanded .result-card.full-width {
    grid-column: 1 / -1;
}

.modal-content-wrapper {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    padding: 0;
}

.modal-content-wrapper::-webkit-scrollbar {
    width: 8px;
}

.modal-content-wrapper::-webkit-scrollbar-track {
    background: #f5f5f7;
    border-radius: 4px;
}

.modal-content-wrapper::-webkit-scrollbar-thumb {
    background: #e7a690;
    border-radius: 4px;
}

.modal-content-wrapper::-webkit-scrollbar-thumb:hover {
    background: #d4956f;
}

.modal-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.modal-close,
.modal-expand-btn,
.modal-export-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(34, 35, 35, 0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.modal-close:hover,
.modal-expand-btn:hover,
.modal-export-btn:hover {
    background: rgba(231, 166, 144, 0.2);
}

.modal-close:hover {
    transform: rotate(90deg);
}

.modal-expand-btn:hover {
    transform: scale(1.1);
}

.modal-export-btn:hover {
    transform: translateY(-2px);
}

.modal-step {
    display: none;
    padding: 40px;
    animation: fadeIn 0.3s ease;
}

.modal-step.active {
    display: block;
}

.modal-header {
    text-align: center;
    margin-bottom: 32px;
}

.modal-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.modal-title {
    font-family: 'Archivo Black', sans-serif;
    font-size: 28px;
    color: #222323;
    margin-bottom: 8px;
}

.modal-description {
    font-family: 'Archivo', sans-serif;
    font-size: 14px;
    color: #4a4d68;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #eeece1;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #e7a690;
    background: rgba(231, 166, 144, 0.05);
}

.upload-area.drag-over {
    border-color: #e7a690;
    background: rgba(231, 166, 144, 0.1);
}

.upload-icon {
    color: #e7a690;
    margin-bottom: 20px;
}

.upload-btn {
    padding: 12px 32px;
    background: #e7a690;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-family: 'Archivo', sans-serif;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    background: #d4956f;
    transform: translateY(-2px);
}

.upload-preview img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 16px;
}

.change-photo-btn {
    padding: 10px 24px;
    background: transparent;
    color: #e7a690;
    border: 2px solid #e7a690;
    border-radius: 50px;
    font-family: 'Archivo', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.change-photo-btn:hover {
    background: #e7a690;
    color: #ffffff;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.modal-btn-secondary,
.modal-btn-primary {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-family: 'Archivo', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn-secondary {
    background: #f5f5f7;
    color: #222323;
}

.modal-btn-secondary:hover {
    background: #eeece1;
}

.modal-btn-primary {
    background: #e7a690;
    color: #ffffff;
}

.modal-btn-primary:hover:not(:disabled) {
    background: #d4956f;
    transform: translateY(-2px);
}

.modal-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-trust-badges {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid #f5f5f7;
}

.trust-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.trust-badge i {
    color: #e7a690;
    font-size: 20px;
}

.trust-badge span {
    font-family: 'Archivo', sans-serif;
    font-size: 11px;
    color: #4a4d68;
    font-weight: 600;
}

/* Analyzing Step */
.analyzing-content {
    text-align: center;
    padding: 40px 0;
}

.analyzing-spinner {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 32px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid #f5f5f7;
    border-top-color: #e7a690;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    animation: pulse 2s ease-in-out infinite;
}

.analyzing-text {
    font-family: 'Archivo', sans-serif;
    font-size: 16px;
    color: #4a4d68;
    margin-bottom: 24px;
}

.analyzing-progress {
    max-width: 300px;
    margin: 0 auto;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f5f5f7;
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e7a690 0%, #d4956f 100%);
    border-radius: 50px;
    transition: width 0.3s ease;
}

.progress-percent {
    font-family: 'Archivo', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #e7a690;
}

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

@keyframes sparkle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes shine {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

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

/* Results Display */
.results-header {
    text-align: center;
    margin-bottom: 32px;
}

.results-header.error {
    color: #e74c3c;
}

.results-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.results-header h3 {
    font-family: 'Archivo Black', sans-serif;
    font-size: 28px;
    color: #222323;
    margin-bottom: 8px;
}

.results-subtitle {
    font-family: 'Archivo', sans-serif;
    font-size: 14px;
    color: #4a4d68;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.result-card {
    padding: 20px;
    background: #f5f5f7;
    border-radius: 12px;
    border: 2px solid #eeece1;
    transition: all 0.3s ease;
}

.result-card:hover {
    border-color: #e7a690;
    transform: translateY(-2px);
}

.result-card.full-width {
    grid-column: 1 / -1;
}

.result-card-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.result-card h4 {
    font-family: 'Archivo', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #4a4d68;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.result-value {
    font-family: 'Archivo Black', sans-serif;
    font-size: 24px;
    color: #222323;
    margin-bottom: 4px;
}

.result-detail {
    font-family: 'Archivo', sans-serif;
    font-size: 12px;
    color: #4a4d68;
}

.result-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

.result-list li {
    font-family: 'Archivo', sans-serif;
    font-size: 14px;
    color: #222323;
    padding: 8px 0;
    border-bottom: 1px solid #eeece1;
}

.result-list li:last-child {
    border-bottom: none;
}

.result-list.numbered {
    list-style: decimal;
    padding-left: 20px;
}

.raw-analysis {
    font-family: 'Archivo', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #222323;
}

.results-footer {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 2px solid #eeece1;
}

.myavana-free-share {
    margin-bottom: 20px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #eeece1;
    background: #f9f8f7;
}

.myavana-free-share h4 {
    margin: 0 0 8px;
    color: #222323;
    font-family: 'Archivo', sans-serif;
    font-size: 16px;
}

.myavana-free-share p {
    margin: 0 0 12px;
    font-size: 13px;
    color: #4a4d68;
}

.myavana-free-share-actions,
.myavana-free-social-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.myavana-free-social-btn {
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    background: #222323;
    color: #fff;
    font-family: 'Archivo', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.remaining-analyses {
    text-align: center;
    padding: 16px;
    background: rgba(231, 166, 144, 0.1);
    border-radius: 12px;
    margin-bottom: 24px;
}

.remaining-analyses p {
    font-family: 'Archivo', sans-serif;
    font-size: 14px;
    color: #222323;
    margin: 0;
}

.remaining-analyses strong {
    color: #e7a690;
    font-weight: 700;
}

.signup-cta {
    padding: 32px;
    background: linear-gradient(135deg, #e7a690 0%, #d4956f 100%);
    border-radius: 16px;
    color: #ffffff;
    text-align: center;
    margin-bottom: 24px;
}

.signup-cta.prominent {
    padding: 40px;
    background: linear-gradient(135deg, #4a4d68 0%, #222323 100%);
}

.signup-cta h4 {
    font-family: 'Archivo Black', sans-serif;
    font-size: 24px;
    margin-bottom: 12px;
    color: #ffffff;
}

.signup-cta p {
    font-family: 'Archivo', sans-serif;
    font-size: 14px;
    margin-bottom: 16px;
    opacity: 0.9;
}

.signup-cta ul {
    text-align: left;
    max-width: 400px;
    margin: 24px auto;
    list-style: none;
    padding: 0;
}

.signup-cta ul li {
    font-family: 'Archivo', sans-serif;
    font-size: 14px;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.signup-btn {
    padding: 16px 40px;
    background: #ffffff;
    color: #e7a690;
    border: none;
    border-radius: 50px;
    font-family: 'Archivo Black', sans-serif;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 16px 0;
}

.signup-btn.large {
    padding: 20px 48px;
    font-size: 18px;
}

.signup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.signup-note {
    font-size: 12px !important;
    opacity: 0.8 !important;
    margin-top: 8px !important;
}

.limit-reached-content {
    text-align: center;
    padding: 20px 0;
}

.error-actions {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .myavana-free-analysis-cta {
        padding: 80px 0;
    }

    .myavana-free-analysis-container {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 20px;
    }

    .myavana-free-analysis-title {
        font-size: 36px;
    }

    .myavana-free-analysis-trust {
        flex-direction: column;
        gap: 16px;
    }

    .modal-container {
        width: 95%;
    }

    .modal-step {
        padding: 24px;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }
}

/* Modal-specific responsive hardening */
body.myavana-free-analysis-open {
    overflow: hidden;
}

.myavana-free-analysis-modal .modal-overlay {
    cursor: pointer;
}

@media (max-width: 768px) {
    .myavana-free-analysis-modal .modal-container {
        width: calc(100% - 20px);
        max-height: calc(100dvh - 20px);
    }

    .myavana-free-analysis-modal .modal-controls {
        top: 12px;
        right: 12px;
        gap: 6px;
    }

    .myavana-free-analysis-modal .modal-close,
    .myavana-free-analysis-modal .modal-expand-btn,
    .myavana-free-analysis-modal .modal-export-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .myavana-free-analysis-modal .modal-expand-btn {
        display: none;
    }

    .myavana-free-analysis-modal .modal-step {
        padding: 20px 18px 24px;
    }

    .myavana-free-analysis-modal .upload-area {
        padding: 24px 16px;
    }

    .myavana-free-analysis-modal .modal-actions,
    .myavana-free-analysis-modal .error-actions {
        flex-direction: column;
    }

    .myavana-free-share-actions,
    .myavana-free-social-actions {
        flex-direction: column;
    }

    .myavana-free-analysis-modal .modal-btn-secondary,
    .myavana-free-analysis-modal .modal-btn-primary {
        width: 100%;
    }

    .myavana-free-analysis-modal .modal-trust-badges {
        flex-wrap: wrap;
        gap: 12px;
    }

    .myavana-free-analysis-modal .signup-cta,
    .myavana-free-analysis-modal .signup-cta.prominent {
        padding: 24px 18px;
    }
}

@media (max-width: 480px) {
    .myavana-free-analysis-modal .modal-container {
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        top: 0;
        left: 0;
        transform: none;
        border-radius: 0;
        animation: none;
    }

    .myavana-free-analysis-modal .modal-content-wrapper {
        padding-top: 56px;
    }

    .myavana-free-analysis-modal .modal-step {
        padding: 16px 14px 20px;
    }

    .myavana-free-analysis-modal .modal-title {
        font-size: 22px;
    }

    .myavana-free-analysis-modal .modal-icon {
        font-size: 40px;
    }

    .myavana-free-analysis-modal .upload-icon i {
        font-size: 2.5rem !important;
    }

    .myavana-free-analysis-modal .upload-btn,
    .myavana-free-analysis-modal .signup-btn {
        width: 100%;
        justify-content: center;
    }

    .myavana-free-analysis-modal .results-header h3 {
        font-size: 22px;
    }

    .myavana-free-analysis-modal .result-value {
        font-size: 20px;
    }

    .myavana-free-analysis-modal .analyzing-content {
        padding: 20px 0;
    }

    .myavana-free-analysis-modal .analyzing-spinner {
        width: 92px;
        height: 92px;
        margin-bottom: 20px;
    }

    .myavana-free-analysis-modal .spinner-icon {
        font-size: 34px;
    }
}
