/* ====================================
   Invoice Generator Complete Styles
   ==================================== */

/* Common Tool Styles */
.tool-page {
    padding-top: 0;
}

.breadcrumb {
    padding: 20px 0;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
}

.breadcrumb a:hover {
    color: #667eea;
}

.breadcrumb .separator {
    margin: 0 10px;
    color: #e0e0e0;
}

.breadcrumb .current {
    color: #1a1a1a;
    font-weight: 600;
}

.tool-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tool-header-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.tool-icon-large {
    font-size: 72px;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.tool-header h1 {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 15px;
}

.tool-subtitle {
    font-size: 20px;
    opacity: 0.95;
    margin-bottom: 25px;
    line-height: 1.6;
}

.tool-meta {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 16px;
}

.meta-separator {
    opacity: 0.5;
}

.tool-content {
    padding: 60px 20px;
    background: #f8f9fa;
}

/* Invoice Generator Specific */
.invoice-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 450px 1fr;
    gap: 30px;
    align-items: start;
}

.invoice-controls {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    max-height: 85vh;
    overflow-y: auto;
}

.controls-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.controls-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.controls-header p {
    color: #666;
    font-size: 14px;
}

.invoice-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.invoice-section:last-of-type {
    border-bottom: none;
}

.invoice-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 15px;
}

.template-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.template-option {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.template-option:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.template-option.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    font-size: 13px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input[type="file"] {
    padding: 6px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    min-height: 60px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.logo-preview {
    max-width: 150px;
    max-height: 80px;
    margin-top: 10px;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
    padding: 5px;
}

.invoice-item-row {
    display: grid;
    grid-template-columns: 2fr 80px 100px 100px 40px;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
}

.invoice-item-row input {
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
}

.item-remove-btn {
    width: 40px;
    height: 40px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.item-remove-btn:hover {
    background: #c82333;
}

.add-item-btn {
    width: 100%;
    padding: 10px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s;
}

.add-item-btn:hover {
    background: #218838;
}

.totals-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-weight: 600;
}

.grand-total {
    font-size: 18px;
    color: #667eea;
    border-top: 2px solid #667eea;
    padding-top: 12px;
    margin-top: 8px;
}

.generate-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.3);
}

.invoice-preview {
    position: sticky;
    top: 20px;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.invoice-preview h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
    text-align: center;
}

.canvas-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

#invoiceCanvas {
    max-width: 100%;
    height: auto;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-radius: 5px;
}

.download-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.download-btn {
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.download-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.pdf-btn {
    background: #dc3545;
}

.pdf-btn:hover {
    background: #c82333;
}

/* SEO Content */
.seo-content {
    padding: 80px 20px;
    background: white;
}

.content-article {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

.content-article h2 {
    font-size: 32px;
    font-weight: 800;
    margin-top: 50px;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.content-article h2:first-child {
    margin-top: 0;
}

.content-article h3 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 35px;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.content-article p {
    margin-bottom: 20px;
    color: #666;
    font-size: 16px;
}

.content-article ul,
.content-article ol {
    margin-bottom: 25px;
    padding-left: 30px;
    color: #666;
}

.content-article li {
    margin-bottom: 12px;
    line-height: 1.8;
}

.content-article strong {
    color: #1a1a1a;
    font-weight: 700;
}

.related-tools {
    max-width: 900px;
    margin: 60px auto 0;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 12px;
}

.related-tools h3 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 30px;
    text-align: center;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.related-tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 25px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
}

.related-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.related-tool-card .tool-icon {
    font-size: 42px;
}

.related-tool-card .tool-name {
    font-weight: 700;
    color: #1a1a1a;
}

/* Responsive */
@media (max-width: 1200px) {
    .invoice-container {
        grid-template-columns: 400px 1fr;
    }
}

@media (max-width: 1024px) {
    .invoice-container {
        grid-template-columns: 1fr;
    }
    
    .invoice-preview {
        position: static;
    }
    
    .invoice-controls {
        max-height: none;
    }
}

@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 32px;
    }
    
    .tool-subtitle {
        font-size: 16px;
    }
    
    .tool-icon-large {
        font-size: 52px;
    }
    
    .invoice-controls,
    .invoice-preview {
        padding: 20px;
    }
    
    .template-selector {
        grid-template-columns: 1fr;
    }
    
    .form-row,
    .form-row-3 {
        grid-template-columns: 1fr;
    }
    
    .invoice-item-row {
        grid-template-columns: 1fr;
    }
    
    .download-buttons {
        grid-template-columns: 1fr;
    }
    
    .content-article h2 {
        font-size: 26px;
    }
    
    .content-article h3 {
        font-size: 20px;
    }
    
    .related-tools-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .tool-header {
        padding: 40px 15px;
    }
    
    .tool-header h1 {
        font-size: 26px;
    }
    
    .tool-subtitle {
        font-size: 14px;
    }
    
    .tool-content {
        padding: 40px 15px;
    }
    
    .invoice-controls,
    .invoice-preview {
        padding: 15px;
    }
    
    .controls-header h2 {
        font-size: 20px;
    }
    
    .seo-content {
        padding: 60px 15px;
    }
    
    .content-article h2 {
        font-size: 22px;
    }
    
    .content-article h3 {
        font-size: 18px;
    }
    
    .related-tools {
        padding: 25px 15px;
    }
}