label.apf-field-label {
    display: none;
}
input.input-text.apf-text {
    width: 100%;
}
.apf-lite-trigger-wrap {
    margin: 15px 0 15px;
	    margin: 10px 0 14px;
    gap: 20px;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
}
.apf-open-modal {
    padding: 0px;
    background: #d1983f;
    color: #fff;
    border: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 29%;
}

button.button.book {
    width: 37%;
	padding: 0 12px;
}
.apf-open-modal:hover {
    background: #000 !important;
    color: #fff;
}
.ap-added-text {
    margin-left:10px; 
    color:green; 
    font-weight:bold;
}
/* Modal shell & overlay */
.apf-modal[aria-hidden="true"] { display: none; }
.apf-modal[aria-hidden="false"] { display: flex; }
.apf-modal {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 10000;
    align-items: center; justify-content: center;
}
.apf-modal__overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.45);
}
.apf-modal__dialog {
    position: relative; margin: auto; background: #fff; border-radius: 0px;
    min-width: 350px; width: 600px; max-width: 95vw;
    max-height: 100vh; display: flex; flex-direction: column; box-shadow: 0 8px 32px rgba(0,0,0,.18);
    z-index: 9999999;
}
.apf-modal__title { margin: 0; font-size: 16px; font-weight: 500; color: black;}
.apf-modal__close {
 background: rgba(0, 0, 0, 0.1);
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 8px;
    width: 24px;
    height: 24px;
    display: flex
;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

{ background: transparent; border: none; font-size: 25px; font-weight: 600; color: #333; cursor: pointer;}
.apf-modal__body { padding: 16px 18px; flex:1; overflow:auto;}
.apf-modal__footer { padding: 12px 18px; border-top: 1px solid #eee; display: flex; gap: 10px; justify-content: flex-end;}
.apf-modal__summary .apf-summary-wrapper {margin-top:10px;}
body.apf-modal-open {overflow: hidden !important;}
/* Fine-tune for tablet/mobile separately as needed */
/* Desktop (centered modal): already handled by .apf-modal__dialog */

@media (max-width: 1024px) {
    .apf-modal__dialog {
        position: fixed;
        left: 50%;
        bottom: 0;
        top: auto;
        transform: translate(-50%, 0);
        width: 100vw;
        max-width: none;
        margin: 0;
        border-radius: 15px 15px 0 0;
        box-shadow: 0 -8px 24px rgba(0,0,0,0.15);
        padding-bottom: 0;
        animation: apf-bottom-sheet-in 0.5s cubic-bezier(.45, 0, .4, 1);

    }
	
	.apf-modal__footer {
    padding: 12px 18px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-direction: column;
}
@keyframes apf-bottom-sheet-in {
    from { transform: translate(-50%, 100%);}
    to   { transform: translate(-50%, 0);}
}
@keyframes apf-bottom-sheet-out {
    from { transform: translate(-50%, 0);}
    to   { transform: translate(-50%, 100%);}
}

    .apf-modal {
        align-items: flex-end !important;
    }
    .apf-modal__header, .apf-modal__footer { 
padding: 10px 20px;
		border-radius: 10px 10px;
    }
	.apf-bottom-sheet-out {
    animation: apf-bottom-sheet-out 0.5s cubic-bezier(.45, 0, .4, 1) !important;
  }
}


/* Prevent page scroll when sheet is open (already in your base rules):
body.apf-modal-open { overflow: hidden !important; }
/* Ring size button always next to engraving button */
.apf-lite-trigger-wrap .apf-open-ring-modal {
    background:#fff; color:#222; border:1px solid #bbb;
    font-weight:500;
	    padding: 0 20px;
	width: 25%;
}
.apf-lite-trigger-wrap .apf-open-ring-modal:focus,
.apf-lite-trigger-wrap .apf-open-ring-modal:hover { color:#fff !important;
	background:#000;
}

/* --- Ring Modal: Full Right Panel on Desktop, Bottom Sheet on Tablet/Mobile --- */
.apf-ring-modal[aria-hidden="true"] { display: none; }
.apf-ring-modal[aria-hidden="false"] { display: flex; }
.apf-ring-modal {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh; z-index: 10100;
    align-items: stretch; justify-content: flex-end;
    background: none;
}

.apf-modal__dialog-right {
position: absolute;
        right: 0;
        width: 420px;
        height: 100%;
        background-color: white;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        z-index: 999999999999;
		        transform: translateX(0);
				Bottom:0;
 animation: apf-right-slide-in 0.45s cubic-bezier(.25,.8,.25,1) forwards;
}


/* When CLOSING (add a .closing class in JS before hiding) */
.apf-ring-modal.closing .apf-modal__dialog-right {
    animation: apf-right-slide-out 0.45s cubic-bezier(.25,.8,.25,1) forwards;
}

@keyframes apf-right-slide-in {
    from { transform: translateX(100%); opacity: 0.96; }
    to   { transform: translateX(0); opacity: 1; }
}
@keyframes apf-right-slide-out {
    from { transform: translateX(0); opacity: 1; }
    to   { transform: translateX(100%); opacity: 0.9; }
}

.apf-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    position: relative;
    z-index: 10;
}
.apf-modal__close-ring{
    background: rgba(0, 0, 0, 0.1);
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 8px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;}
.apf-modal__body.apf-ring-modal-body {
    padding: 20px 30px 30px 24px; flex: 1 1 auto; overflow-y: auto; 
}
.apf-ring-tabs { display: flex; gap: 12px;}
.apf-ring-tab { display: flex;}
.apf-ring-tab.apf-active {
    color: #000;
    border-bottom-color: #333;
    font-weight: 500;
}
.apf-ring-tab-content { display: block; }
.apf-ring-tab-content:not(.apf-ring-tab-size) { padding-bottom: 6px; }
.apf-ring-row { margin-bottom: 16px; display:flex; align-items: center;}
.apf-ring-country-select {
    width: 100%;
    font-size: 15px;
    padding: 9px 10px 10px 10px;
    border: 1.5px solid #e5e5ec;
    border-radius: 7px;
	   background: #fff url('data:image/svg+xml;utf8,<svg fill="gray" viewBox="0 0 20 20" ...') no-repeat right 10px center/16px 16px;
}
.apf-ring-size-options {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}
.apf-ring-size-btn {
    padding: 0px 5px;
    border-radius: 6px;
    border: 1.5px solid #eaeaea;
    background: #fafbfc;
    color: #303030;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    outline: none;
    box-shadow: none;
    transition: background 0.14s, color 0.14s, border 0.19s;
    line-height: 40px;
}
.apf-ring-size-btn:hover,
.apf-ring-size-btn.apf-active {
border-color: #d1983f;
    background: #d1983f;
    color: white;
}

.apf-ring-guide-block { 
    overflow-y: auto;
}

@media (max-width: 1024px) {
    .apf-ring-modal {
        align-items: flex-end !important;
        justify-content: center;
    }
    .apf-modal__dialog-right {
        position: fixed; left: 50%; bottom: 0; top: auto;
        transform: translate(-50%, 0);
        width: 100vw; max-width: 100vw;
        min-width: 0; margin: 0;
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -8px 24px rgba(0,0,0,0.13);
        height: auto; max-height: 90vh; 
        animation: apf-bottom-sheet-in 0.5s cubic-bezier(.45, 0, .4, 1);
		border-radius: 0px;
	    height:400px;
		border-radius: 10px 10px 0px 0px;
    }
@keyframes apf-bottom-sheet-in {
    from { transform: translate(-50%, 100%);}
    to   { transform: translate(-50%, 0);}
}
@keyframes apf-bottom-sheet-out {
    from { transform: translate(-50%, 0);}
    to   { transform: translate(-50%, 100%);}
}
    .apf-modal__body.apf-ring-modal-body {
        padding: 16px 12px 14px 10px;
    }
	
	    .apf-modal__body.apf-ring-modal-body::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        background: #c0c0c0;
        border-radius: 2px;
        z-index: 10;
        cursor: grab;
    }

    ..apf-modal__body.apf-ring-modal-body.dragging::before {
        cursor: grabbing;
    }

    .apf-modal__body.apf-ring-modal-body.dragging {
        background-color: rgba(0,0,0,0.3);
    }
}


button.apf-ring-tab {
    padding: 0px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    transition: all 0.3s ease;
}

.apf-ring-guide-block h3 {
    color: #333;
    margin-bottom: 15px;
    margin-top: 0px;
    font-size: 22px;
    font-weight: 500;
}

button.button.apf-modal-remove {
    background: #f3f3f3;
    border-color: #dbdbdb;
    color: #444;
    line-height: 20px;
    padding: 15px;
}

button.button.button-primary.apf-modal-save {
    flex: 1;
    padding: 0px;
    background: #d1983f;
    color: #fff;
    border: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

select#apf-ring-country-select {
    border: 1.5px solid #e5e5ec;
}
h4.apf-summary-title {
    margin: 15px 0px 15px 0px;
    font-size: 20px;
}

.header-right-items {
    z-index: 0;
}


@media only screen and (max-width: 600px) {
.apf-open-modal {
    width: 45%;
}
.apf-lite-trigger-wrap .apf-open-ring-modal {
    width: 48%;
}
	button.button.book {
    width: 100%;
}
}

button.apf-modal__close {
    border-radius: 100px;
}

button.apf-modal__close-ring {
	    border-radius: 100px;
}


