/**
 * Screen Print Quote Builder Specific Styles
 * Extracted from inline styles for better maintainability
 * These styles were previously inline in screenprint-quote-builder.html
 */

:root {
    --primary-color: #4cb354;
    --primary-dark: #409a47;
    --primary-light: #5bc85f;
    --primary-lightest: #e8f5e9;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
}

body {
    background: var(--bg-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.page-title {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Phase Navigation */
.phase-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.phase-step {
    flex: 1;
    text-align: center;
    position: relative;
    cursor: pointer;
}

.phase-step.active .step-number {
    background: var(--primary-color);
    color: white;
}

.phase-step.completed .step-number {
    background: var(--primary-dark);
    color: white;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border-color);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.phase-step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.phase-connector {
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--border-color);
    z-index: -1;
}

/* Phase Sections */
.phase-section {
    display: none;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.phase-section.active {
    display: block;
}

.phase-header {
    margin-bottom: 2rem;
}

.phase-header h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.phase-header p {
    color: var(--text-secondary);
}

/* Setup Cards */
.setup-card {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.setup-title {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Print Locations Grid */
.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.location-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.location-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.location-card.selected {
    border-color: var(--primary-color);
    background: var(--primary-lightest);
}

.location-card input[type="checkbox"] {
    display: none;
}

.location-card label {
    pointer-events: none; /* Prevent label from triggering events */
}

.location-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.location-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.location-code {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Color Selection */
.color-selector {
    margin-top: 1rem;
}

.color-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.color-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.color-btn:hover {
    border-color: var(--primary-light);
}

.color-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Dark Garment Toggle */
.dark-garment-section {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border: 2px solid #6b7280;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.dark-garment-toggle {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 30px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(30px);
}

/* Safety Stripes Section - Preserve orange styling */
.safety-stripes-section {
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8dc 100%);
    border: 2px solid #ff6b35;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    position: relative;
}

.safety-stripes-toggle {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.safety-label {
    color: #ff6b35;
    font-weight: 600;
    display: flex;
    align-items: center;
    position: relative;
    gap: 0.5rem;
}

.safety-icon {
    color: #ff6b35;
}

/* Tooltip for safety stripes */
.info-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ff6b35;
    color: white;
    font-size: 0.75rem;
    cursor: help;
    position: relative;
    margin-left: 0.25rem;
}

.info-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
    max-width: 300px;
    white-space: normal;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-weight: normal;
}

.info-tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
    z-index: 1000;
}

/* Price breakdown tooltip */
.price-with-tooltip {
    position: relative;
    display: inline-block;
    font-weight: 600;
    color: var(--primary-color);
    cursor: help;
    border-bottom: 1px dashed var(--primary-color);
}

.price-with-tooltip .tooltip-content {
    visibility: hidden;
    background: #333;
    color: white;
    text-align: left;
    border-radius: 8px;
    padding: 12px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 280px;
    font-size: 0.875rem;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.3s;
    white-space: pre-line;
}

.price-with-tooltip .tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.price-with-tooltip:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}

/* Product Search */
.search-row {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 1rem;
    align-items: end;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-top: 0.25rem;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.suggestion-item {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.suggestion-item:hover {
    background: var(--primary-lightest);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-style {
    font-weight: 600;
    color: var(--primary-color);
}

.suggestion-name {
    color: var(--text-primary);
    margin-left: 0.5rem;
}

/* Product Display */
.product-display {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.product-info {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.product-info img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 8px;
    background: white;
    padding: 0.5rem;
}

.product-details h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.product-details p {
    color: var(--text-secondary);
}

/* Size Matrix */
.size-matrix {
    margin-top: 1.5rem;
}

.size-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
}

.size-input-group {
    text-align: center;
}

.size-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.size-quantity {
    width: 100%;
    padding: 0.5rem;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-weight: 500;
}

.size-quantity:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary:disabled {
    background: var(--border-color);
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.phase-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

/* Products List */
.products-list {
    margin-top: 2rem;
}

.product-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-item-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-item-details h4 {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.product-item-details p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.product-item-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Quote Summary */
.quote-summary {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.summary-section {
    margin-bottom: 1.5rem;
}

.summary-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-label {
    color: var(--text-secondary);
}

.summary-value {
    font-weight: 600;
    color: var(--text-primary);
}

.summary-total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--primary-color);
}

.summary-total .summary-row {
    border-bottom: none;
}

.summary-total .summary-value {
    font-size: 1.25rem;
    color: var(--primary-color);
}

/* Customer Info */
.customer-info-section {
    margin-bottom: 2rem;
}

.customer-info-section h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
}

/* Success Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.modal-header {
    margin-bottom: 1.5rem;
}

.modal-header.success {
    color: var(--primary-color);
}

.modal-header i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.modal-body {
    margin-bottom: 1.5rem;
}

.quote-id-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1rem 0;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Minimum Order Warning Styles */
.minimum-order-warning {
    background: linear-gradient(135deg, #fff5e5 0%, #ffebe0 100%);
    border: 2px solid #ff9800;
    border-radius: 12px;
    padding: 20px 25px;
    margin: 20px 0;
    display: none;
    animation: slideDown 0.3s ease;
    box-shadow: 0 4px 8px rgba(255, 152, 0, 0.15);
}

.minimum-order-warning.show {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.warning-icon {
    font-size: 2.5rem;
    color: #ff9800;
    flex-shrink: 0;
    margin-top: 5px;
}

.warning-content {
    flex: 1;
}

.warning-content h4 {
    color: #e65100;
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.warning-content p {
    color: #666;
    margin: 8px 0;
    font-size: 0.95rem;
}

.warning-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.warning-content li {
    color: #666;
    margin: 5px 0;
    font-size: 0.9rem;
}

.warning-content strong {
    color: #333;
    font-weight: 600;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alternative-calculator-links {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.alternative-calculator-links a {
    display: inline-block;
    padding: 8px 16px;
    background: #4cb354;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.alternative-calculator-links a:hover {
    background: #3d8b44;
}