/**
 * AI Productivity Calculator Styles
 */

/* Base styles */
.apc-calculator {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Container width option - fills available space */
.apc-calculator[style*="container"] {
    max-width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .apc-calculator {
        padding: 0 15px;
        max-width: 100% !important; /* Always full width on mobile */
    }
}

@media (max-width: 480px) {
    .apc-calculator {
        padding: 0 10px;
    }
}

.apc-calculator * {
    box-sizing: border-box;
}

/* Loading state */
.apc-loading {
    text-align: center;
    padding: 60px 20px;
}

.apc-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: apc-spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Error state */
.apc-error {
    text-align: center;
    padding: 40px 20px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    margin: 20px 0;
}

.apc-error p {
    color: #c33;
    margin-bottom: 20px;
}

/* Steps indicator */
.apc-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 0 20px;
}

.apc-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.apc-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 60%;
    width: 80%;
    height: 2px;
    background: #ddd;
    z-index: -1;
}

.apc-step.completed:not(:last-child)::after {
    background: #28a745;
}

.apc-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ddd;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.apc-step.active .apc-step-number {
    background: #007cba;
    color: white;
}

.apc-step.completed .apc-step-number {
    background: #28a745;
    color: white;
}

.apc-step-label {
    font-size: 14px;
    text-align: center;
    color: #666;
    max-width: 120px;
}

.apc-step.active .apc-step-label {
    color: #007cba;
    font-weight: 600;
}

/* Step content */
.apc-step-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.apc-step-content h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.apc-step-content > p {
    margin-bottom: 25px;
    color: #666;
}

/* Form elements */
.apc-field-group {
    margin-bottom: 25px;
}

.apc-field-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.apc-field-description {
    margin-top: 8px;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.apc-input,
.apc-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: white;
}

.apc-input:focus,
.apc-select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.apc-select:disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

/* Radio buttons */
.apc-compensation-toggle {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.apc-radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

.apc-radio-label input[type="radio"] {
    margin-right: 8px;
    transform: scale(1.2);
}

/* Task categories */
.apc-task-category {
    margin-bottom: 30px;
}

.apc-task-category h4 {
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #007cba;
    color: #007cba;
    font-size: 18px;
    font-weight: 600;
}

.apc-task-list {
    display: grid;
    gap: 15px;
}

.apc-task {
    padding: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: white;
}

.apc-task:hover {
    border-color: #007cba;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.1);
}

.apc-task.selected {
    border-color: #007cba;
    background: #f8fbff;
}

.apc-task-header {
    margin-bottom: 10px;
}

.apc-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-weight: 500;
}

.apc-checkbox-label input[type="checkbox"] {
    margin-right: 12px;
    margin-top: 2px;
    transform: scale(1.3);
}

.apc-task-name {
    flex: 1;
}

.apc-task-description {
    margin: 8px 0 15px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.apc-task-hours {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e1e5e9;
}

.apc-task-hours label {
    font-weight: 500;
    margin-bottom: 0;
    white-space: nowrap;
}

.apc-hours-input {
    width: 120px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

/* Tools section */
.apc-tools-search {
    margin-bottom: 25px;
}

.apc-tool-category {
    margin-bottom: 25px;
}

.apc-tool-group h4 {
    margin: 0 0 15px 0;
    color: #007cba;
    font-size: 16px;
    font-weight: 600;
}

.apc-tool-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.apc-tool {
    padding: 15px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: white;
}

.apc-tool:hover {
    border-color: #007cba;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.1);
}

.apc-tool.selected {
    border-color: #007cba;
    background: #f8fbff;
}

.apc-tool .apc-checkbox-label {
    align-items: center;
}

.apc-tool-logo {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    border-radius: 4px;
}

.apc-tool-description {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* Navigation */
.apc-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.apc-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.apc-btn-primary {
    background: #007cba;
    color: white;
}

.apc-btn-primary:hover:not(.disabled) {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

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

.apc-btn-secondary:hover {
    background: #545b62;
    transform: translateY(-1px);
}

.apc-btn.disabled,
.apc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Results section */
.apc-results {
    margin-top: 40px;
}

.apc-results-hero {
    background: linear-gradient(135deg, #007cba, #0056b3);
    color: white;
    padding: 50px 30px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 124, 186, 0.3);
}

.apc-hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.apc-stat {
    text-align: center;
}

.apc-stat-value {
    display: block;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 8px;
}

.apc-stat-label {
    font-size: 18px;
    opacity: 0.9;
    font-weight: 500;
}

.apc-hero-comment {
    font-size: 20px;
    font-style: italic;
    opacity: 0.95;
}

.apc-hero-comment p {
    margin: 0;
}

/* Ads */
.apc-ad {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    text-align: center;
}

.apc-ad h4 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 20px;
}

.apc-ad p {
    margin: 0 0 20px 0;
    color: #666;
    line-height: 1.5;
}

.apc-ad-link {
    display: inline-block;
    padding: 12px 24px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.apc-ad-link:hover {
    background: #005a87;
    transform: translateY(-1px);
    color: white;
}

/* Results table */
.apc-results-table {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.apc-results-table h3 {
    margin: 0 0 25px 0;
    color: #333;
    font-size: 24px;
}

.apc-table {
    width: 100%;
    border-collapse: collapse;
    min-width: auto;
}

.apc-table th,
.apc-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.apc-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    white-space: nowrap;
}

.apc-table td {
    font-size: 14px;
    white-space: nowrap;
}

.apc-table-total {
    background: #f8fbff;
    border-top: 2px solid #007cba;
}

.apc-table-total td {
    font-weight: 600;
}

/* Charts */
.apc-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.apc-chart-container {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.apc-chart-container h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    text-align: center;
}

/* Suggested tools */
.apc-suggested-tools {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.apc-suggested-tools h3 {
    margin: 0 0 25px 0;
    color: #333;
    font-size: 24px;
}

.apc-tool-group {
    margin-bottom: 30px;
}

.apc-tool-group h4 {
    margin: 0 0 15px 0;
    color: #007cba;
    font-size: 18px;
}

.apc-tool-suggestions {
    display: grid;
    gap: 20px;
}

.apc-suggested-tool {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.apc-suggested-tool:hover {
    border-color: #007cba;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.1);
}

.apc-suggested-tool .apc-tool-logo {
    width: 48px;
    height: 48px;
    margin-right: 16px;
    flex-shrink: 0;
}

.apc-tool-info {
    flex: 1;
    margin-right: 16px;
}

.apc-tool-info h5 {
    margin: 0 0 6px 0;
    font-size: 16px;
    color: #333;
}

.apc-tool-info p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.apc-free-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #28a745;
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
}

.apc-tool-link {
    padding: 10px 20px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.apc-tool-link:hover {
    background: #005a87;
    color: white;
}

/* Bottom ads */
.apc-bottom-ads {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.apc-ad-bottom {
    margin: 0;
}

/* Share section */
.apc-share-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.apc-share-section h3 {
    margin: 0 0 25px 0;
    color: #333;
    font-size: 24px;
}

.apc-share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.apc-share-card-generated {
    text-align: center;
    margin-top: 20px;
}

.apc-share-card-preview {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 15px 0;
}

/* Toast notifications */
.apc-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.apc-toast.show {
    transform: translateX(0);
}

/* Responsive design */
@media (max-width: 768px) {
    .apc-calculator {
        margin: 0 15px;
    }
    
    .apc-steps {
        padding: 0 10px;
    }
    
    .apc-step-label {
        font-size: 12px;
        max-width: 80px;
    }
    
    .apc-step-content {
        padding: 20px;
    }
    
    .apc-navigation {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .apc-btn {
        width: 100%;
    }
    
    .apc-hero-stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .apc-stat-value {
        font-size: 36px;
    }
    
    .apc-results-table {
        padding: 15px;
    }
    
    .apc-table {
        font-size: 12px;
    }
    
    .apc-charts {
        grid-template-columns: 1fr;
    }
    
    .apc-tool-list {
        grid-template-columns: 1fr;
    }
    
    .apc-suggested-tool {
        flex-direction: column;
        text-align: center;
    }
    
    .apc-suggested-tool .apc-tool-logo {
        margin-right: 0;
        margin-bottom: 12px;
    }
    
    .apc-tool-info {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .apc-share-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .apc-share-buttons .apc-btn {
        width: 200px;
    }
    
    .apc-bottom-ads {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .apc-step-content {
        padding: 15px;
    }
    
    .apc-step-content h3 {
        font-size: 20px;
    }
    
    .apc-compensation-toggle {
        flex-direction: column;
        gap: 10px;
    }
    
    .apc-task-hours {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .apc-hours-input {
        width: 100%;
    }
    
    .apc-results-hero {
        padding: 30px 20px;
    }
    
    .apc-stat-value {
        font-size: 28px;
    }
    
    .apc-stat-label {
        font-size: 16px;
    }
    
    .apc-hero-comment {
        font-size: 18px;
    }

    /* Inline hours input */
    .apc-task-hours-inline {
        margin-left: auto;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .apc-hours-label {
        font-size: 14px;
        color: #666;
        white-space: nowrap;
    }

    .apc-hours-input-inline {
        width: 100px;  /* Make it bigger */
        padding: 8px 12px;  /* More padding */
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 20px !important;  /* Force bigger font */
        text-align: center;
        font-weight: bold !important;  /* Also make it bold */
    }


    .apc-checkbox-label {
        display: flex;
        align-items: center;
        width: 100%;
    }

    .apc-task-name {
        flex: 1;
    }

    .apc-table th {
        line-height: 1.3;
        padding: 10px 8px;
        text-align: center;
        vertical-align: middle;
    }

    .apc-table td {
        text-align: center;
        vertical-align: middle;
    }

    /* First column (task names) left-aligned */
    .apc-table th:first-child,
    .apc-table td:first-child {
        text-align: left;
    }

}

/* Add mobile responsiveness: */
@media (max-width: 768px) {
    .apc-calculator {
        max-width: 100%;
        padding: 0 15px;
    }

    
    .apc-table th,
    .apc-table td {
        padding: 8px 4px;
        font-size: 12px;
        white-space: nowrap;
    }
}

/* Smaller task panels */
.apc-task {
    padding: 12px !important;
}

.apc-task-list {
    gap: 10px !important;
}

/* Smaller task fonts */
.apc-checkbox-label {
    font-size: 14px !important;
    font-weight: 400 !important;
}

.apc-task-description {
    font-size: 12px !important;
    margin: 5px 0 10px 0 !important;
}

.apc-task-header {
    margin-bottom: 5px !important;
}

/* Smaller hours input */
.apc-hours-input-inline {
    width: 80px !important;
    padding: 6px 8px !important;
    font-size: 14px !important;
    font-weight: normal !important;
}

.apc-hours-label {
    font-size: 12px !important;
}

.apc-task-hours-inline {
    gap: 6px !important;
}