/* 
 * Resume sizing fixes
 */

/* Resume container sizing fixes */
.resume-content-container {
    position: relative;
    max-width: 900px;
    /* Increased max-width for better viewing */
    margin: 0 auto;
}

.resume-content {
    display: none;
    margin-top: 2rem;
    max-width: 900px;
    /* Match container */
    margin-left: auto;
    margin-right: auto;
}

.resume-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
    /* From animations.css */
    border: 1px solid var(--light-border);
    /* Use theme variable for border */
    border-radius: var(--border-radius-lg);
    /* Use theme variable for radius */
    padding: 1.5rem;
    /* Add some padding */
    background-color: var(--light-card-bg);
    /* Use theme variable for background */
    box-shadow: var(--light-shadow-md);
    /* Add shadow for consistency */
}

/* UPDATE in css/resume-fix.css - replace the existing rule */
.dark-theme .resume-content.active {
    border-color: var(--dark-secondary);
    background-color: var(--dark-card-bg);
    box-shadow: var(--dark-shadow-md);
}

/* Resume preview iframe container */
.resume-preview {
    width: 100%;
    height: 70vh;
    /* Viewport height based, good for various screen sizes */
    min-height: 500px;
    /* Minimum height */
    max-height: 800px;
    /* Maximum height */
    margin: 0 auto 2rem;
    /* Centered, with bottom margin */
    border-radius: var(--border-radius-md);
    /* Use theme variable */
    overflow: hidden;
    border-style: solid;
    /* MODIFIED: Define style */
    border-width: 2px;
    /* MODIFIED: Was implicitly 1px, now thicker for the "blackthick border" effect */
    /* border-color will be set by theme-specific rules below */
}

.light-theme .resume-preview {
    border-color: var(--light-border) !important;
    border-width: 2px;
}

/* ADD to css/resume-fix.css - to ensure consistent border for all resume types */
.dark-theme .resume-preview {
    border-color: var(--dark-secondary) !important;
    border-width: 2px;
}


/* Resume iframe */
.resume-preview iframe {
    width: 100%;
    height: 100%;
    border: none;
    overflow: hidden;
}
.resume-preview iframe {
    border-radius: calc(var(--border-radius-md) - 2px) !important; /* Slightly smaller than container */
    position: relative;
    z-index: 1; /* Ensure it's above any pseudo-elements */
}

/* Resume tabs improvement */
.resume-tabs {
    /* Styling primarily in modern-style.css */
    display: flex;
    justify-content: center;
    /* Center tabs */
    margin-bottom: 2rem;
    border-bottom: 1px solid;
    /* Themed in modern-style.css */
    padding-bottom: 1px;
    /* Align with underline */
    gap: 0.5rem;
    max-width: 900px;
    /* Match container */
    margin-left: auto;
    margin-right: auto;
    overflow-x: auto;
    /* Allow scrolling on small screens */
}

/* Resume action buttons */
.resume-actions {
    /* Styling primarily in modern-style.css */
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .resume-content.active {
        padding: 1rem;
        /* Slightly less padding on mobile */
    }

    .resume-preview {
        height: 60vh;
        /* Adjust for mobile */
        min-height: 400px;
    }

    .resume-actions {
        flex-direction: column;
        /* Stack buttons on mobile */
    }

    .view-resume-btn,
    /* Button styles from modern-style.css */
    .download-resume-btn {
        width: 100%;
        /* Full width buttons on mobile */
        justify-content: center;
        /* Center icon and text if flex */
    }

    .resume-tabs {
        justify-content: flex-start;
        /* Align tabs to start on mobile for scrollability */
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .resume-preview {
        height: 65vh;
    }
}

/* Prevent iframe overflow - good practice */
iframe {
    max-width: 100%;
}

/* Hide scrollbar for resume-tabs container */
.resume-tabs::-webkit-scrollbar {
    display: none !important;
    height: 0 !important;
    width: 0 !important;
    background: transparent !important;
}

.resume-tabs {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

/* REPLACE in css/resume-fix.css - this existing rule */
.dark-theme #webdev-resume .resume-preview {
    border-color: var(--dark-secondary); /* Matches the same styling as other resume types */
}

.light-theme .resume-preview::after {
    background-color: var(--light-card-bg);
}

/* This attempts to hide the button with CSS */
.resume-preview::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background-color: var(--dark-card-bg);
    z-index: 10;
    pointer-events: none; /* Still allow clicking through */
}

/* ADD to css/resume-fix.css */
.resume-tab {
    font-size: 1.2rem; /* Increased font size */
    font-weight: 600;
    padding: 0.75rem 1.75rem; /* Slightly more padding for larger touch area */
    transition: all 0.3s ease;
}

@media (max-width: 767px) {
    .resume-tab {
        font-size: 1.1rem; /* Slightly smaller on mobile but still larger than default */
        padding: 0.75rem 1.25rem;
    }
}

@media (max-width: 767px) {
    /* Better resume display */
    .resume-preview {
        height: auto !important;
        max-height: 75vh !important;
        min-height: auto !important;
        overflow: hidden !important;
    }
    
    .resume-preview iframe {
        height: 100% !important;
        min-height: 500px !important;
    }
}

@media (max-width: 767px) {
    /* Hide iframe control buttons on mobile */
    .resume-preview iframe {
        pointer-events: none;
    }
    
    .resume-preview::after {
        display: none !important;
    }
    
    /* Allow interaction with view/download buttons only */
    .resume-actions {
        pointer-events: auto;
    }
}