/* Resume Formatter Components */
/* Buttons, forms, alerts, indicators and other UI components */

.btn {
    display: inline-block;
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s ease;
    min-height: 44px;
    box-sizing: border-box;
    touch-action: manipulation;
    user-select: none;
}

.btn-primary {
    background-color: #204f70;
    color: white;
}

.btn-primary:hover {
    background-color: #163d57;
}

/* Button styling with increased specificity to override conflicts */
#chooseFileButton.btn-choose-file,
.btn-choose-file {
    background-color: #e2eeff !important;
    color: #204f70 !important;
    border: 1px solid #204f70 !important;
}

#chooseFileButton.btn-choose-file:hover,
.btn-choose-file:hover {
    background-color: #c5d9ff !important;
    color: #163d57 !important;
    border-color: #163d57 !important;
}

#formatResumeButton.btn-format,
.btn-format {
    background-color: #204f70 !important;
    color: white !important;
}

#formatResumeButton.btn-format:hover,
.btn-format:hover {
    background-color: #163d57 !important;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-error {
    background-color: #dc3545;
    color: white;
}

.btn-error:hover {
    background-color: #c82333;
}

/* Dialog Components */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.dialog-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.dialog-title {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 18px;
}

.dialog-title.error-color {
    color: #dc3545;
}

.dialog-title.info-color {
    color: #204f70;
}

.dialog-message {
    margin-bottom: 20px;
    line-height: 1.5;
}

.dialog-button {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

/* Bouncing dots animation for loading indicators */
.bouncing-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: #333;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.bouncing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.bouncing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1.0);
    }
}

/* Formatting indicator styling */
#formattingIndicator {
    display: none;
    margin-top: 15px;
    font-size: 20px;
    font-weight: bold;
    color: #204f70;
    text-align: left;
    letter-spacing: 0.01em;
}

#formattingIndicator .bouncing-dots {
    display: inline-block;
    margin-left: 6px;
    vertical-align: middle;
    height: 1em;
}

#formattingIndicator .bouncing-dots span {
    background-color: #204f70;
    animation: bounce 1.4s infinite both;
}

#formattingIndicator .bouncing-dots span:nth-child(1) { 
    animation-delay: -0.32s; 
}

#formattingIndicator .bouncing-dots span:nth-child(2) { 
    animation-delay: -0.16s; 
}

/* Upload interface styling */
.filename-display {
    color: #666;
    font-style: italic;
    min-width: 150px;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-align: center;
}

.filename-display.file-selected {
    color: #204f70;
    font-style: normal;
    font-weight: 500;
    background-color: #e7f3ff;
    border-color: #204f70;
}

/* High specificity enabled states to override any conflicting styles */
html body #formatResumeButton.btn-format,
html body #formatResumeButton.btn.btn-format,
body #formatResumeButton.btn-format,
#formatResumeButton.btn-format {
    background-color: #204f70 !important;
    color: white !important;
    cursor: pointer !important;
}

html body #formatResumeButton.btn-format:hover,
html body #formatResumeButton.btn.btn-format:hover,
body #formatResumeButton.btn-format:hover,
#formatResumeButton.btn-format:hover {
    background-color: #163d57 !important;
    color: white !important;
}

html body #chooseFileButton.btn-choose-file,
html body #chooseFileButton.btn.btn-choose-file,
body #chooseFileButton.btn-choose-file,
#chooseFileButton.btn-choose-file {
    background-color: #e2eeff !important;
    color: #204f70 !important;
    border-color: #204f70 !important;
    cursor: pointer !important;
}

html body #chooseFileButton.btn-choose-file:hover,
html body #chooseFileButton.btn.btn-choose-file:hover,
body #chooseFileButton.btn-choose-file:hover,
#chooseFileButton.btn-choose-file:hover {
    background-color: #c5d9ff !important;
    color: #163d57 !important;
    border-color: #163d57 !important;
}

/* High specificity disabled states to override enabled states */
html body #formatResumeButton.btn-format:disabled,
html body #formatResumeButton.btn.btn-format:disabled,
body #formatResumeButton.btn-format:disabled,
#formatResumeButton.btn-format:disabled,
#formatResumeButton:disabled,
.btn-format:disabled,
.btn-primary:disabled {
    background-color: #6c757d !important;
    color: #ffffff !important;
    border-color: #6c757d !important;
    cursor: not-allowed !important;
}

html body #formatResumeButton.btn-format:disabled:hover,
html body #formatResumeButton.btn.btn-format:disabled:hover,
body #formatResumeButton.btn-format:disabled:hover,
#formatResumeButton.btn-format:disabled:hover,
#formatResumeButton:disabled:hover,
.btn-format:disabled:hover,
.btn-primary:disabled:hover {
    background-color: #6c757d !important;
    color: #ffffff !important;
    border-color: #6c757d !important;
    cursor: not-allowed !important;
}

html body #chooseFileButton.btn-choose-file:disabled,
html body #chooseFileButton.btn.btn-choose-file:disabled,
body #chooseFileButton.btn-choose-file:disabled,
#chooseFileButton.btn-choose-file:disabled,
#chooseFileButton:disabled,
.btn-choose-file:disabled {
    background-color: #e9ecef !important;
    color: #6c757d !important;
    border-color: #dee2e6 !important;
    cursor: not-allowed !important;
}

html body #chooseFileButton.btn-choose-file:disabled:hover,
html body #chooseFileButton.btn.btn-choose-file:disabled:hover,
body #chooseFileButton.btn-choose-file:disabled:hover,
#chooseFileButton.btn-choose-file:disabled:hover,
#chooseFileButton:disabled:hover,
.btn-choose-file:disabled:hover {
    background-color: #e9ecef !important;
    color: #6c757d !important;
    border-color: #dee2e6 !important;
    cursor: not-allowed !important;
}

/* Container styling */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hide status elements - always hidden, errors shown as alerts */
#docxStatus,
#status {
    display: none !important;
}