/* ChangeMyCabinets jQuery Component Styles */

.cmc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.cmc-card {
    background: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.cmc-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.cmc-btn-primary {
    background-color: #2563eb;
    color: white;
}

.cmc-btn-primary:hover:not(:disabled) {
    background-color: #1d4ed8;
}

.cmc-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cmc-btn-secondary {
    background-color: #64748b;
    color: white;
}

.cmc-btn-secondary:hover:not(:disabled) {
    opacity: 0.9;
}

.cmc-input-group {
    margin-bottom: 1rem;
}

.cmc-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.cmc-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.cmc-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.cmc-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.cmc-success {
    color: #10b981;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.cmc-loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: cmc-spin 0.6s linear infinite;
}

@keyframes cmc-spin {
    to { transform: rotate(360deg); }
}

.cmc-image-container {
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
}

.cmc-image-preview {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.cmc-text-center {
    text-align: center;
}

.cmc-text-secondary {
    color: #64748b;
}

.cmc-mb-2 {
    margin-bottom: 1rem;
}

.cmc-mt-2 {
    margin-top: 1rem;
}

.cmc-grid {
    display: grid;
    gap: 1.5rem;
}

.cmc-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Color Selector Styles */
.cmc-selected-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: #f8fafc;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.cmc-color-swatch-large {
    width: 3rem;
    height: 3rem;
    border-radius: 0.25rem;
    border: 2px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cmc-selected-label {
    font-weight: 500;
    color: #1e293b;
}

.cmc-color-selector,
.cmc-style-selector {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    background-color: #fafafa;
}

.cmc-color-group,
.cmc-style-group {
    margin-bottom: 1.5rem;
}

.cmc-color-group:last-child,
.cmc-style-group:last-child {
    margin-bottom: 0;
}

.cmc-color-group-title,
.cmc-style-group-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.cmc-color-swatches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
}

.cmc-color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.375rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.cmc-color-option:hover {
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.cmc-color-option.selected {
    border-color: #2563eb;
    background-color: #EFF6FF;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.cmc-color-swatch {
    width: 3rem;
    height: 3rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cmc-color-name {
    font-size: 0.75rem;
    text-align: center;
    color: #1e293b;
    font-weight: 500;
}

.cmc-style-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

.cmc-style-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.375rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.cmc-style-option:hover {
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.cmc-style-option.selected {
    border-color: #2563eb;
    background-color: #EFF6FF;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.cmc-style-icon {
    font-size: 2rem;
    color: #1e293b;
    line-height: 1;
}

.cmc-style-name {
    font-size: 0.875rem;
    text-align: center;
    color: #1e293b;
    font-weight: 500;
}

/* Scrollbar styling */
.cmc-color-selector::-webkit-scrollbar,
.cmc-style-selector::-webkit-scrollbar {
    width: 8px;
}

.cmc-color-selector::-webkit-scrollbar-track,
.cmc-style-selector::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.cmc-color-selector::-webkit-scrollbar-thumb,
.cmc-style-selector::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.cmc-color-selector::-webkit-scrollbar-thumb:hover,
.cmc-style-selector::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Image Clickable Style */
.cmc-image-clickable {
    cursor: pointer;
    transition: opacity 0.2s;
}

.cmc-image-clickable:hover {
    opacity: 0.9;
}

/* Image Modal Styles */
.cmc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cmc-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.cmc-modal-content {
    position: relative;
    z-index: 10001;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.cmc-modal-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 10px 10px -5px rgb(0 0 0 / 0.2);
}

.cmc-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    transition: all 0.2s;
    color: #1e293b;
}

.cmc-modal-close:hover {
    background: white;
    transform: scale(1.1);
}

