/* WSPF Visual Framing Styles */

.wspf-container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.wspf-split-screen {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 20px;
    background: #fff;
    padding: 0px;
}

/* Left Panel Styles */
.wspf-left-panel {
    padding-right: 20px;
    border-right: 1px solid #e0e0e0;
}

.wspf-left-panel h3,
.wspf-right-panel h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.wspf-control-group {
    margin-bottom: 25px;
}

.wspf-control-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

/* Layer header with toggle */
.wspf-layer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.wspf-layer-header label:first-child {
    margin-bottom: 0;
}

/* Toggle Switch Styles */
.wspf-toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-bottom: 0 !important;
}

.wspf-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.wspf-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.wspf-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.wspf-toggle-switch input:checked + .wspf-toggle-slider {
    background-color: #2271b1;
}

.wspf-toggle-switch input:checked + .wspf-toggle-slider:before {
    transform: translateX(26px);
}

.wspf-toggle-switch input:focus + .wspf-toggle-slider {
    box-shadow: 0 0 1px #2271b1;
}

/* Disabled state for controls */
.wspf-control-group.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Frame Selector Styles */
.wspf-frame-selector-group {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 2px solid #e0e0e0;
}

.wspf-frames-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.wspf-frame-option {
    position: relative;
}

.wspf-frame-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wspf-frame-label {
    display: block;
    cursor: pointer;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.wspf-frame-label:hover {
    border-color: #2271b1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.wspf-frame-radio:checked + .wspf-frame-label {
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.2);
}

.wspf-frame-image-wrapper {
    position: relative;
    height: 120px;
    background: #f5f5f5;
    overflow: hidden;
}

.wspf-frame-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wspf-frame-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #e0e0e0;
    color: #999;
}

.wspf-frame-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: #2271b1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.wspf-frame-radio:checked + .wspf-frame-label .wspf-frame-check {
    opacity: 1;
    transform: scale(1);
}

.wspf-frame-check .dashicons {
    color: #fff;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.wspf-frame-info {
    padding: 12px;
}

.wspf-frame-info h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333 !important;
}

.wspf-frame-price-tag {
    margin: 0 0 8px 0;
    font-weight: 600;
    color: #2271b1;
    font-size: 13px;
}

.wspf-frame-desc {
    margin: 0;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

/* Price Calculation Display */
.wspf-price-calculation {
    margin-top: 20px;
    margin-bottom: 25px;
    padding: 10px;
    background: #f0f8ff;
    border: 2px solid #2271b1;
    border-radius: 4px;
}

.wspf-price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wspf-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.wspf-price-row span:first-child {
    color: #555;
    font-weight: 500;
}

.wspf-price-total {
  /*  padding-top: 12px;
    border-top: 2px solid #2271b1; */
    font-size: 18px;
    font-weight: 700;
}

.wspf-total-price {
    color: #2271b1;
    font-size: 24px;
}

/* Responsive Frame Grid */
@media (max-width: 768px) {
    .wspf-frames-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 10px;
    }
    
    .wspf-frame-image-wrapper {
        height: 100px;
    }
    
    .wspf-frame-info h4 {
        font-size: 13px;
        color: #333;
    }
    
    .wspf-frame-price-tag {
        font-size: 12px;
    }
}

/* Visual separator for second border section */
#wspf-border-color2,
#wspf-border-size2 {
    margin-top: 5px;
}


/* Visual separator for third border section */
#wspf-border-color3,
#wspf-border-size3 {
    margin-top: 5px;
}


.wspf-file-input {
    width: 100%;
    padding: 10px;
    border: 2px dashed #ccc;
    border-radius: 4px;
    cursor: pointer;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.wspf-file-input:hover {
    border-color: #999;
    background: #f0f0f0;
}

.wspf-help-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Dimensions Display */
.wspf-dimensions {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

/* Frame size display - distinct styling */
.wspf-frame-size {
    background: #e8f4f8;
    border: 2px solid #2271b1;
}

.wspf-dimension-item {
    display: inline-block;
    align-items: center;
    padding: 0 10px;
}

.wspf-dimension-item:first-child {
    border-bottom: 0px solid #ddd;
}

.wspf-frame-size .wspf-dimension-item:first-child {
    border-bottom: 0px solid #2271b1;
}

.wspf-dimension-label {
    font-weight: 500;
    color: #555;
    min-width: 60px;
}

.wspf-dimension-value {
    font-size: 14px;
    font-weight: 600;
    color: #2271b1;
    margin: 0 5px;
}

.wspf-frame-size .wspf-dimension-value {
    font-size: 14px;
    color: #135e96;
}

.wspf-dimension-unit {
    color: #666;
    font-size: 14px;
}

/* Color Picker */
.wspf-color-picker {
    width: 100%;
    height: 50px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    padding: 5px;
}

.wspf-color-picker:hover {
    border-color: #999;
}

/* Number Input */
.wspf-number-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.wspf-number-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

/* Button */
.wspf-button {
    width: 100%;
    padding: 12px 20px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.wspf-button:hover:not(:disabled) {
    background: #135e96;
}

.wspf-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Right Panel Styles */
.wspf-right-panel {
    padding: 20px;
}

.wspf-canvas-wrapper {
    position: relative;
    width: 100%;
    min-height: auto;
    background: #f9f9f9;
    border: none;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    box-shadow: -10px 10px 20px #888;
    margin-bottom: 60px;
}

#wspf-canvas {
    display: none;
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#wspf-canvas.active {
    display: block;
}

.wspf-placeholder {
    text-align: center;
    color: #999;
    font-size: 16px;
}

.wspf-placeholder p {
    margin: 0;
}
/* ========================================
   Image Resize Controls
   ======================================== */

#wspf-resize-group {
    border: 1px solid #aaabab;
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
}

.wspf-resize-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.wspf-resize-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.wspf-resize-label {
    font-size: 13px;
    font-weight: 500;
    color: #555;
    margin: 0;
}

.wspf-resize-input {
    width: 80px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    -webkit-transition: border-color 0.3s ease;
    transition: border-color 0.3s ease;
}

.wspf-resize-input:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
    border-color: #2271b1;
}
/*
.wspf-resize-lock {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wspf-lock-toggle {
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.wspf-lock-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wspf-lock-icon {
    display: inline-block;
    font-size: 24px;
    line-height: 1;
    -webkit-transition: transform 0.3s ease;
    transition: transform 0.3s ease;
}

.wspf-lock-toggle input[type="checkbox"]:not(:checked) + .wspf-lock-icon {
    -webkit-transform: rotate(15deg);
    -ms-transform: rotate(15deg);
    transform: rotate(15deg);
}

.wspf-lock-toggle input[type="checkbox"]:not(:checked) + .wspf-lock-icon::before {
    content: '🔓';
}

.wspf-lock-toggle input[type="checkbox"]:checked + .wspf-lock-icon::before {
    content: '🔒';
}

.wspf-lock-toggle:hover .wspf-lock-icon {
    -webkit-transform: scale(1.1);
    -ms-transform: scale(1.1);
    transform: scale(1.1);
}
*/
.wspf-resize-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.wspf-button-small {
    padding: 8px 16px;
    font-size: 14px;
    flex: 1;
}

.wspf-button-secondary {
    background: #666;
}

.wspf-button-secondary:hover:not(:disabled) {
    background: #444;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .wspf-split-screen {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .wspf-left-panel {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding-bottom: 20px;
    }
    
    .wspf-right-panel {

        padding-top: 20px;
    }
}

@media (max-width: 768px) {
    .wspf-container {
        padding: 10px;
    }
    
    .wspf-split-screen {
        padding: 0px;
    }
    
    .wspf-canvas-wrapper {
        min-height: auto;
    }
     .wspf-resize-controls {
        gap: 10px;
    }
    
    .wspf-resize-input-group {
        width: 100%;
    }
    
    .wspf-resize-lock {
        order: -1;
    }
    
    .wspf-resize-buttons {
        flex-direction: column;
    }
}
/* ========================================
   Price Calculator Toggle Options
   ======================================== */

.wspf-toggle-group {
    margin-bottom: 15px;
}

.wspf-toggle-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
    -webkit-transition: background 0.3s ease;
    transition: background 0.3s ease;
}

.wspf-toggle-option:hover {
    background: #ebebeb;
}

.wspf-toggle-option input[type="checkbox"] {
    position: relative;
    width: 40px;
    height: 20px;
    -webkit-appearance: none;
    appearance: none;
    background: #ccc;
    outline: none;
    border-radius: 20px;
    cursor: pointer;
    -webkit-transition: 0.3s;
    transition: 0.3s;
    margin: 0;
}

.wspf-toggle-option input[type="checkbox"]:checked {
    background: #2271b1;
}

.wspf-toggle-option input[type="checkbox"]:before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    background: #fff;
    -webkit-transition: 0.3s;
    transition: 0.3s;
}

.wspf-toggle-option input[type="checkbox"]:checked:before {
    left: 22px;
}

.wspf-toggle-option input[type="checkbox"]:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.wspf-toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    user-select: none;
}
