/* Base styles from Professional Template */
.cv-page {
    position: relative;
    transition: width 0.6s ease, height 0.6s ease, max-height 0.6s ease, max-width 0.6s ease !important;
    border: 1px solid lightgray;
    border-radius: 15px;
    width: 816px;
    max-width: 816px;
    min-height: 1056px;
    max-height: 1056px;
    height: auto;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 0 auto;
}

input.cv-text,
textarea.cv-text {
    border: none;
    border-radius: 0;
    word-wrap: break-word;
    background: none;
}

input:focus,
textarea:focus {
    outline: none !important;
}

.cv-text {
    display: block;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'Montserrat', sans-serif !important;
    word-wrap: break-word;
    overflow: hidden;
    line-height: 1.5 !important;
    letter-spacing: -0.01em;
    box-sizing: border-box !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ensure consistent rendering for export spans */
span.cv-text.changed {
    display: block !important;
    width: 100% !important;
}

/* Exception for auto-width spans in flex headers */
.section-head span.cv-text.changed {
    width: auto !important;
    display: inline-block !important;
    flex: 0 0 auto !important;
}

textarea {
    display: block;
    resize: none;
    overflow: hidden;
}

/* Analyst Template Overrides */
.cv-page.analyst-template {
    background-color: white;
    color: #444;
    padding: 0 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 400;
}

.analyst-template .h-font-1 {
    font-family: 'Montserrat', sans-serif !important;
}

.analyst-template .bg-waves {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 95% 5%, rgba(59, 141, 147, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 5% 95%, rgba(212, 167, 106, 0.04) 0%, transparent 40%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1000' height='1000' viewBox='0 0 1000 1000'%3E%3Cpath d='M0,1000 C200,900 300,700 500,800 C700,900 800,700 1000,600 L1000,0 L0,0 Z' fill='none' stroke='%233b8d93' stroke-width='0.5' opacity='0.2'/%3E%3Cpath d='M0,950 C250,850 350,650 550,750 C750,850 850,650 1050,550 L1050,0 L0,0 Z' fill='none' stroke='%233b8d93' stroke-width='0.5' opacity='0.1'/%3E%3C/svg%3E");
    background-size: cover;
    pointer-events: none;
    z-index: 0;
}

.analyst-template .content-container {
    position: relative;
    z-index: 1;
    padding: 60px 60px !important;
    overflow: visible !important;
    /* Allow edit bar to pop out on the side */
}

/* Color Variables */
:root {
    --analyst-teal: var(--theme-color, #3b8d93);
    --analyst-gold: #d4a76a;
    --theme-color: #3b8d93;
}

.analyst-teal-color {
    color: var(--analyst-teal);
}

.analyst-gold-color {
    color: var(--analyst-gold);
}

.analyst-dark {
    color: #333;
}

.analyst-secondary {
    color: #888;
}

.analyst-teal-bg {
    background-color: var(--analyst-teal) !important;
}

/* Section Headers */
.section-head {
    margin-top: 15px;
    display: flex !important;
    width: 100% !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
}

.section-divider {
    flex: 1 1 0% !important;
    height: 1px;
    background-color: #eee;
    position: relative;
    margin-left: 15px;
    min-width: 30px;
}

.section-divider::after {
    content: '';
    position: absolute;
    right: 0;
    top: -2.5px;
    width: 6px;
    height: 6px;
    background-color: var(--analyst-teal);
    border-radius: 50%;
}

/* Skills Pills */
.skill-pill-container {
    padding: 6px 14px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 2px;
}

.cv-input-reset {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    outline: none !important;
}

/* Font Sizes */
.cv-font-larger {
    font-size: 42px !important;
}

.cv-font-large {
    font-size: 24px !important;
}

.cv-font-medium {
    font-size: 18px !important;
}

.cv-font-small {
    font-size: 14px !important;
}

/* Builder UI Elements - Global styles in editor-ui.css are now identical to these */
.cv-component:hover {
    border-color: var(--analyst-teal) !important;
}

/* Builder Controls Override - Standard Top-Right position for Analyst */
.analyst-template .cv-edit-bar {
    left: auto !important;
    right: 10px !important;
    top: -32px !important;
    background-color: mediumslateblue !important;
    border-radius: 8px 8px 0 0 !important;
    flex-direction: row !important;
    display: none;
    animation: fadeIn 0.15s ease-out !important;
}

.analyst-template .cv-color-palette {
    display: flex !important;
    flex-direction: row !important;
    gap: 5px !important;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cv-component:hover .cv-edit-bar {
    display: flex !important;
}

/* Professional Style Classes compat */
.professional-color {
    color: var(--analyst-teal);
}

.professional-border {
    border-color: var(--analyst-teal) !important;
}

.professional-bg {
    background-color: var(--analyst-teal) !important;
}

/* Alignment helpers */
.text-justify {
    text-align: justify;
}

/* Achievements styling */
.achievement-row i {
    color: var(--analyst-teal);
    font-size: 8px;
}

.analyst-template .achievement-row {
    line-height: 1.6;
}

/* Header Text shadow for clarity on waves */
.cv-title {
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}