/* 
 * Premium Camera Capture & Cropping Modal Stylesheet
 */

/* Force SweetAlert2 alerts to overlay on top of the crop/capture modal */
.swal2-container {
    z-index: 100015 !important;
}

.icc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100005;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.icc-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.icc-modal-container {
    background: #ffffff;
    border-radius: 20px;
    width: 92%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.icc-modal-overlay.active .icc-modal-container {
    transform: translateY(0);
}

.icc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.icc-modal-title {
    font-weight: 800;
    font-size: 16px;
    color: #0f172a;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.icc-modal-close {
    cursor: pointer;
    border: none;
    background: none;
    font-size: 26px;
    line-height: 1;
    color: #94a3b8;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 0;
}

.icc-modal-close:hover {
    color: #cf2027;
    transform: scale(1.1);
}

.icc-modal-body {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: relative;
}

/* Source Selection Screen */
.icc-source-screen {
    display: flex;
    gap: 16px;
    width: 100%;
    justify-content: center;
    padding: 10px 0;
}

.icc-source-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    cursor: pointer;
    background: #f8fafc;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: #334155;
    text-align: center;
    outline: none;
}

.icc-source-btn:hover,
.icc-source-btn:focus {
    border-color: #cf2027;
    background: #fff5f5;
    color: #cf2027;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(207, 32, 39, 0.08);
}

.icc-source-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.icc-source-title {
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 4px;
}

.icc-source-desc {
    font-size: 11px;
    color: #64748b;
}

.icc-source-btn:hover .icc-source-desc {
    color: #b0181d;
}

/* Camera Screen */
.icc-camera-screen {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.icc-video-container {
    position: relative;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    background: #090d16;
    border: 2px solid #cbd5e1;
}

.icc-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* mirror selfie mode */
}

/* circular guidelines overlay */
.icc-camera-guideline {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px dashed rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35);
}

/* Crop Screen */
.icc-crop-screen {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.icc-cropper-wrapper {
    width: 100%;
    height: 300px;
    border-radius: 16px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
}

.icc-cropper-wrapper img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

/* Controls & Adjustment */
.icc-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    width: 100%;
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
}

.icc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    transition: all 0.2s ease;
    outline: none;
}

.icc-btn:hover,
.icc-btn:focus {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.icc-btn-primary {
    background: #cf2027;
    border-color: #cf2027;
    color: #ffffff;
}

.icc-btn-primary:hover,
.icc-btn-primary:focus {
    background: #b0181d;
    border-color: #b0181d;
    color: #ffffff;
}

.icc-btn-danger {
    background: #fee2e2;
    border-color: #fee2e2;
    color: #ef4444;
}

.icc-btn-danger:hover,
.icc-btn-danger:focus {
    background: #fecaca;
    border-color: #fecaca;
    color: #dc2626;
}

/* Adjustment Sliders */
.icc-adjustment-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 320px;
    margin-bottom: 6px;
}

.icc-range-group {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.icc-range-label {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    width: 80px;
    text-align: right;
}

.icc-range-input {
    flex-grow: 1;
    accent-color: #cf2027;
    cursor: pointer;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

.icc-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #cf2027;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.icc-range-input::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Loading Overlay */
.icc-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    z-index: 10;
}

.icc-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #cf2027;
    border-radius: 50%;
    animation: icc-spin 0.8s linear infinite;
}

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

.icc-loading-text {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
}
