/**
 * Website to PDF Converter Styles
 */

/* Main container */
.website-to-pdf-container {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    margin: 2rem auto;
    max-width: 1200px;
    overflow: hidden;
    position: relative;
}

/* Converter layout */
.converter-row {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    gap: 2rem;
}

@media (min-width: 992px) {
    .converter-row {
        flex-direction: row;
        gap: 0;
    }
}

/* URL Input Column */
.url-input-column {
    flex: 1;
    padding-right: 0;
    margin-bottom: 2rem;
}

@media (min-width: 992px) {
    .url-input-column {
        padding-right: 2rem;
        margin-bottom: 0;
        border-right: 1px solid #eee;
    }
}

/* Options Column */
.options-column {
    flex: 1;
    padding-left: 0;
}

@media (min-width: 992px) {
    .options-column {
        padding-left: 2rem;
    }
}

/* Headings */
.input-heading {
    color: #000;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* URL Input Container */
.url-input-container {
    max-height: 300px;
    overflow-y: auto;
}

.url-input-group {
    display: flex;
    margin-bottom: 10px;
    position: relative;
}

.url-input {
    border: 1px solid #ccc;
    border-radius: 6px;
    flex: 1;
    font-size: 1rem;
    padding: 12px 14px;
    transition: border-color 0.2s;
    color: #333;
}

.url-input:focus {
    border-color: #4a6cf7;
    box-shadow: 0 0 0 2px rgba(74, 108, 247, 0.2);
    outline: none;
}

.remove-url-button {
    align-items: center;
    background: none;
    border: none;
    color: #ff4d4f;
    cursor: pointer;
    display: flex;
    font-size: 1rem;
    justify-content: center;
    margin-left: 10px;
    padding: 0;
    width: 30px;
}

.remove-url-button:hover {
    color: #ff7875;
}

/* URL Actions */
.url-actions {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.add-url-button {
    align-items: center;
    background-color: #f0f2f5;
    border: none;
    border-radius: 6px;
    color: #4a6cf7;
    cursor: pointer;
    display: flex;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    transition: background-color 0.2s;
}

.add-url-button:hover {
    background-color: #e6e9ed;
}

.url-counter {
    color: #000;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Crawl Options */
.crawl-options {
    background-color: #f5f7fa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e8e8e8;
}

.crawl-settings {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Styling Options */
.styling-options {
    background-color: #f5f7fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e8e8e8;
}

.option-group {
    margin-bottom: 20px;
}

.option-group label {
    color: #000;
    display: block;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-select, 
.form-control {
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    color: #000;
    font-size: 1rem;
    padding: 10px 14px;
    width: 100%;
    height: auto;
}

.form-select:focus, 
.form-control:focus {
    border-color: #4a6cf7;
    box-shadow: 0 0 0 2px rgba(74, 108, 247, 0.2);
    outline: none;
}

.form-check {
    align-items: center;
    display: flex;
    margin-bottom: 10px;
}

.form-check-input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    border: 2px solid #000;
}

.form-check-label {
    color: #000 !important;
    font-size: 1rem;
    font-weight: 500;
}

.form-text, .form-text.text-muted {
    color: #000 !important;
    font-size: 0.9rem;
    margin-top: 5px;
    font-weight: 500;
}

/* Range inputs */
.form-range {
    appearance: none;
    background: transparent;
    cursor: pointer;
    width: 100%;
}

/* Range value indicators */
#maxPagesValue, #scaleValue {
    color: #000;
    font-weight: 600;
    font-size: 1.1rem;
    min-width: 30px;
    text-align: center;
}

.form-range::-webkit-slider-runnable-track {
    background: #ccc;
    border-radius: 10px;
    height: 8px;
    width: 100%;
}

.form-range::-webkit-slider-thumb {
    appearance: none;
    background: #4a6cf7;
    border-radius: 50%;
    cursor: pointer;
    height: 20px;
    margin-top: -6px;
    width: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.form-range:focus {
    outline: none;
}

.form-range:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.3);
}

/* Button group */
.btn-group {
    display: flex;
    width: 100%;
}

.btn-check {
    position: absolute;
    clip: rect(0, 0, 0, 0);
    pointer-events: none;
}

.btn-outline-primary {
    background-color: #fff;
    border: 1px solid #ccc;
    color: #000;
    flex: 1;
    font-size: 1rem;
    padding: 10px 16px;
    text-align: center;
    transition: all 0.2s;
}

.btn-check:checked + .btn-outline-primary {
    background-color: #4a6cf7;
    border-color: #4a6cf7;
    color: #fff;
}

.btn-outline-primary:hover {
    background-color: #f5f7ff;
}

.btn-check:checked + .btn-outline-primary:hover {
    background-color: #3a5ce5;
}

/* Convert Button */
.convert-button {
    align-items: center;
    background-color: #4a6cf7;
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: flex;
    font-size: 1.1rem;
    font-weight: 600;
    justify-content: center;
    padding: 14px 24px;
    transition: background-color 0.2s;
    width: 100%;
}

.convert-button:hover {
    background-color: #3a5ce5;
}

.convert-button:disabled {
    background-color: #a0aee8;
    cursor: not-allowed;
}

.button-content {
    align-items: center;
    display: flex;
}

.button-content i {
    margin-right: 8px;
}

/* Result Container */
.result-container {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    margin: 2rem auto;
    max-width: 1200px;
    overflow: hidden;
}

.result-header {
    align-items: center;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem 2rem;
}

@media (min-width: 768px) {
    .result-header {
        flex-direction: row;
    }
}

.result-title {
    color: #333;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 1rem;
}

@media (min-width: 768px) {
    .result-title {
        margin: 0;
    }
}

.result-actions {
    display: flex;
    gap: 10px;
}

.action-button {
    align-items: center;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #555;
    cursor: pointer;
    display: flex;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 16px;
    transition: all 0.2s;
}

.action-button:hover {
    background-color: #f5f7ff;
    border-color: #4a6cf7;
    color: #4a6cf7;
}

.action-button i {
    margin-right: 8px;
}

.result-content {
    padding: 2rem;
}

.result-info {
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .info-item {
        flex-direction: row;
        margin-bottom: 0.75rem;
    }
}

.info-label {
    color: #000;
    font-weight: 600;
    margin-right: 1rem;
    min-width: 100px;
}

.info-value {
    color: #000;
    word-break: break-word;
}

.preview-container {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 2rem;
    text-align: center;
}

.preview-icon {
    color: #ccc;
    font-size: 4rem;
    margin-bottom: 1rem;
}

.preview-text {
    color: #000;
    font-size: 1.1rem;
}

/* Loading Animation */
.loading-animation {
    align-items: center;
    background-color: rgba(255, 255, 255, 0.9);
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 10;
}

.loading-spinner {
    border: 4px solid rgba(74, 108, 247, 0.2);
    border-radius: 50%;
    border-top: 4px solid #4a6cf7;
    height: 50px;
    width: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #000;
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 1rem;
}

.loading-subtext {
    color: #000;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Toast Notification */
.toast-notification {
    background-color: #fff;
    border-left: 4px solid #4a6cf7;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 350px;
    opacity: 0;
    padding: 1rem;
    position: fixed;
    right: -400px;
    top: 20px;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast-notification.error {
    border-left-color: #ff4d4f;
}

.toast-notification.success {
    border-left-color: #52c41a;
}

.toast-notification.show {
    opacity: 1;
    right: 20px;
}

/* Usage Limit Overlay */
.usage-limit-overlay {
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    bottom: 0;
    display: none;
    justify-content: center;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1000;
}

.usage-limit-content {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    padding: 2rem;
    text-align: center;
    width: 90%;
}

.usage-limit-header h3 {
    color: #333;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.usage-limit-header p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.usage-limit-message p {
    color: #555;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.usage-limit-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 576px) {
    .usage-limit-actions {
        flex-direction: row;
        justify-content: center;
    }
}

.signup-button {
    background-color: #4a6cf7;
    border: none;
    border-radius: 6px;
    color: #fff;
    display: inline-block;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 24px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.signup-button:hover {
    background-color: #3a5ce5;
    color: #fff;
    text-decoration: none;
}

.close-button {
    background-color: transparent;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #666;
    cursor: pointer;
    font-size: 1rem;
    padding: 12px 24px;
    transition: all 0.2s;
}

.close-button:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.other-tools-link {
    color: #4a6cf7;
    display: inline-block;
    font-size: 0.95rem;
    text-decoration: none;
}

.other-tools-link:hover {
    text-decoration: underline;
}

/* Ensure all Bootstrap text is visible */
.text-muted, .form-text.text-muted, small.text-muted, label, .form-label {
    color: #000 !important;
    font-weight: 500;
}

.social-content-container {
    margin-top: 3rem;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .converter-row,
    .result-content {
        padding: 1.25rem;
    }
    
    .styling-options,
    .crawl-options {
        padding: 15px;
    }
    
    .input-heading {
        font-size: 1.2rem;
    }
    
    .url-input {
        padding: 10px 12px;
    }
    
    .form-select,
    .form-control {
        padding: 10px 12px;
    }
    
    .convert-button {
        padding: 12px 20px;
    }
}

/* Fix for mobile display */
@media (max-width: 480px) {
    .btn-group {
        flex-direction: column;
    }
    
    .btn-outline-primary {
        margin-bottom: 5px;
    }
    
    .btn-check:checked + .btn-outline-primary {
        margin-bottom: 5px;
    }
    
    .url-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .url-counter {
        margin-top: 8px;
    }
    
    .add-url-button {
        width: 100%;
        justify-content: center;
    }
    
    .form-check-label {
        font-size: 0.95rem;
    }
}
