/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.

For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
using "ui/basic.style";
using "boxes/boxes.style";
using "ui/widgets/widgets.style";
using "ui/layers/layers.style";

PremiumLimits {
	boxLabel: FlatLabel;
	nonPremiumBg: color;
	nonPremiumFg: color;
	gradientFromLeft: bool;
}
PremiumBubble {
	widthLimit: pixels;
	height: pixels;
	padding: margins;
	skip: pixels;
	penWidth: pixels;
	textSkip: pixels;
	tailSize: size;
	font: font;
	additionalStyle: TextStyle;
	additionalSkip: pixels;
	subtextStyle: TextStyle;
	subtextPadding: margins;
}
PremiumCover {
	bg: color;
	starSize: size;
	starTopSkip: pixels;
	titlePadding: margins;
	titleFont: font;
	titleFg: color;
	about: FlatLabel;
	aboutMaxWidth: pixels;
	additionalShadowForDarkThemes: bool;
}
ComposePremiumRequired {
	label: FlatLabel;
	button: RoundButton;
	buttonSkip: pixels;
	buttonTop: pixels;
	position: point;
	icon: icon;
}

premiumAboutTextStyle: TextStyle(defaultTextStyle) {
	font: font(12px);
	linkUnderline: kLinkUnderlineAlways;
	lineHeight: 18px;
}
defaultPremiumCover: PremiumCover {
	bg: boxBg;
	starSize: size(84px, 81px);
	starTopSkip: 37px;
	titlePadding: margins(0px, 18px, 0px, 11px);
	titleFont: boxTitleFont;
	titleFg: windowBoldFg;
	about: FlatLabel(defaultFlatLabel) {
		style: premiumAboutTextStyle;
		palette: TextPalette(defaultTextPalette) {
			linkFg: premiumButtonFg;
		}
		align: align(top);
		textFg: premiumButtonFg;
		minWidth: 190px;
	}
	aboutMaxWidth: 0px;
	additionalShadowForDarkThemes: true;
}
userPremiumCoverAbout: FlatLabel(boxDividerLabel) {
	style: premiumAboutTextStyle;
	minWidth: 315px;
	maxHeight: 0px;
	align: align(top);
}
userPremiumCover: PremiumCover(defaultPremiumCover) {
	about: userPremiumCoverAbout;
}

defaultPremiumBoxLabel: FlatLabel(defaultFlatLabel) {
	minWidth: 220px;
	align: align(topleft);
	style: TextStyle(boxTextStyle) {
		lineHeight: 22px;
	}
}
defaultPremiumLimits: PremiumLimits {
	boxLabel: defaultPremiumBoxLabel;
	nonPremiumBg: windowBgOver;
	nonPremiumFg: windowFg;
	gradientFromLeft: false;
}

// Preview.
premiumPreviewBox: Box(defaultBox) {
	buttonPadding: margins(18px, 18px, 18px, 18px);
	buttonHeight: 44px;
	button: RoundButton(defaultActiveButton) {
		height: 44px;
		textTop: 12px;
		style: semiboldTextStyle;
	}
}
premiumPreviewDoubledLimitsBox: Box(premiumPreviewBox) {
	buttonPadding: margins(12px, 12px, 12px, 12px);
}
premiumPreviewAboutTitlePadding: margins(18px, 19px, 18px, 0px);
premiumPreviewAboutTitle: FlatLabel(defaultFlatLabel) {
	minWidth: 240px;
	textFg: windowBoldFg;
	align: align(top);
	style: TextStyle(defaultTextStyle) {
		font: font(17px semibold);
	}
}
premiumPreviewAbout: FlatLabel(defaultFlatLabel) {
	minWidth: 240px;
	textFg: membersAboutLimitFg;
	align: align(top);
	style: TextStyle(defaultTextStyle) {
		font: font(12px);
	}
}
premiumPreviewAboutPadding: margins(18px, 8px, 18px, 8px);
premiumPreviewButtonLabel: FlatLabel(defaultFlatLabel) {
	textFg: premiumButtonFg;
	style: semiboldTextStyle;
}
premiumSlideDuration: 200;
premiumVideoStarSize: size(77px, 73px);

premiumPreviewHeight: 312px;

premiumDot: 6px;
premiumDotPadding: margins(4px, 4px, 4px, 4px);
premiumDotsMargin: margins(0px, 5px, 0px, 6px);
premiumVideoWidth: 182px;

// Graphics.

defaultPremiumBubble: PremiumBubble {
	widthLimit: 80px;
	height: 40px;
	padding: margins(14px, 0px, 14px, 0px);
	skip: 8px;
	penWidth: 6px;
	textSkip: 3px;
	tailSize: size(21px, 7px);
	font: font(19px);
}
premiumLineRadius: 5px;
premiumLineTextSkip: 11px;
premiumInfographicPadding: margins(0px, 10px, 0px, 15px);

premiumIconChats: icon {{ "limits/chats", settingsIconFg }};
premiumIconFiles: icon {{ "limits/files", settingsIconFg }};
premiumIconFolders: icon {{ "limits/folders", settingsIconFg }};
premiumIconGroups: icon {{ "limits/groups", settingsIconFg }};
premiumIconLinks: icon {{ "limits/links", settingsIconFg }};
premiumIconPins: icon {{ "limits/pins", settingsIconFg }};
premiumIconAccounts: icon {{ "limits/accounts", settingsIconFg }};
premiumIconBoost: icon {{ "limits/boost", settingsIconFg }};

premiumAccountsCheckbox: RoundImageCheckbox(defaultPeerListCheckbox) {
	imageRadius: 27px;
	imageSmallRadius: 23px;
	check: RoundCheckbox(defaultRoundCheckbox) {
		size: 0px;
	}
}
premiumAccountsLabelSize: size(22px, 15px);
premiumAccountsLabelPadding: margins(2px, 2px, 2px, 2px);
premiumAccountsLabelRadius: 6;
premiumAccountsNameTop: 13px;
premiumAccountsPadding: margins(0px, 20px, 0px, 14px);
premiumAccountsHeight: 105px;

PremiumOption {
	rowPadding: margins;
	rowMargins: margins;
	rowHeight: pixels;

	borderWidth: pixels;
	borderRadius: pixels;

	subtitleTop: pixels;
	textLeft: pixels;

	badgeHeight: pixels;
	badgeRadius: pixels;
	badgeMargins: margins;
	badgeShift: point;
}

premiumSubscriptionOption: PremiumOption {
	rowPadding: margins(9px, 2px, 17px, 3px);
	rowMargins: margins(14px, 0px, 5px, 0px);
	rowHeight: 39px;

	borderWidth: 0px;
	borderRadius: 0px;

	subtitleTop: 1px;
	textLeft: 51px;

	badgeHeight: 15px;
	badgeRadius: 4px;
	badgeMargins: margins(3px, 1px, 3px, 0px);
	badgeShift: point(9px, 0px);
}

// Gift.
premiumGiftOption: PremiumOption {
	rowPadding: margins(19px, 2px, 17px, 2px);
	rowMargins: margins(14px, 0px, 15px, 0px);
	rowHeight: 56px;

	borderWidth: 2px;
	borderRadius: 9px;

	subtitleTop: 7px;
	textLeft: 53px;

	badgeHeight: 18px;
	badgeRadius: 4px;
	badgeMargins: margins(5px, 1px, 5px, 0px);
}

premiumGiftBox: Box(premiumPreviewBox) {
	buttonPadding: margins(12px, 12px, 12px, 12px);
}

premiumGiftsUserpicButton: UserpicButton(defaultUserpicButton) {
	size: size(66px, 66px);
	photoSize: 66px;
	photoPosition: point(-1px, -1px);
}

boostSkipTop: 37px;
boostLimits: PremiumLimits(defaultPremiumLimits) {
	gradientFromLeft: true;
	nonPremiumBg: windowBgRipple;
}
negativeStarsLimits: PremiumLimits(boostLimits) {
	gradientFromLeft: false;
}
upgradePriceLimits: PremiumLimits(boostLimits) {
	gradientFromLeft: false;
}
boostBubble: PremiumBubble(defaultPremiumBubble) {
	height: 32px;
	padding: margins(7px, 0px, 11px, 0px);
	skip: 5px;
	textSkip: 2px;
	tailSize: size(14px, 6px);
	font: font(16px);
	additionalStyle: TextStyle(defaultTextStyle) {
		font: font(14px semibold);
	}
	additionalSkip: 2px;
	subtextStyle: TextStyle(defaultTextStyle) {
		font: font(10px);
	}
	subtextPadding: margins(11px, -5px, 11px, 0px);
}
starRatingBubble: PremiumBubble(boostBubble) {
	font: font(16px semibold);
}
iconOnlyPremiumBubble: PremiumBubble(boostBubble) {
	padding: margins(7px, 0px, 7px, 0px);
	textSkip: 0px;
}
boostTitleSkip: 32px;
boostTitle: FlatLabel(defaultFlatLabel) {
	minWidth: 40px;
	textFg: windowBoldFg;
	maxHeight: 24px;
	style: TextStyle(boxTextStyle) {
		font: font(17px semibold);
	}
}
boostTitleBadge: FlatLabel(defaultFlatLabel) {
	margin: margins(4px, 2px, 4px, 2px);
	style: semiboldTextStyle;
	textFg: premiumButtonFg;
}
boostTitleBadgeSkip: 6px;
boostCenteredTitle: FlatLabel(boostTitle) {
	align: align(top);
}
darkEditStarsCenteredTitle: FlatLabel(boostCenteredTitle) {
	textFg: groupCallMembersFg;
}
boostTextSkip: 5px;
boostText: FlatLabel(defaultFlatLabel) {
	minWidth: 40px;
	align: align(top);
}
darkEditStarsText: FlatLabel(boostText) {
	textFg: groupCallMembersFg;
}
boostTextPending: FlatLabel(boostText) {
	textFg: windowSubTextFg;
}
boostTextNegative: FlatLabel(boostText) {
	textFg: attentionButtonFg;
}
boostReassignText: FlatLabel(defaultFlatLabel) {
	minWidth: 40px;
	align: align(top);
}
boostBottomSkip: 6px;
boostBox: Box(premiumPreviewDoubledLimitsBox) {
	buttonPadding: margins(16px, 12px, 16px, 12px);
	buttonHeight: 42px;
	buttonWide: true;
	button: RoundButton(defaultActiveButton) {
		height: 42px;
		textTop: 12px;
		style: semiboldTextStyle;
	}
}
darkEditStarsClose: IconButton(boxTitleClose) {
	icon: icon {{ "box_button_close", groupCallMemberInactiveIcon }};
	iconOver: icon {{ "box_button_close", groupCallMemberInactiveIcon }};
	ripple: RippleAnimation(defaultRippleAnimation) {
		color: groupCallMembersBgOver;
	}
}

boostReplaceUserpicsPadding: margins(0px, 18px, 0px, 20px);
boostReplaceUserpicsSkip: 42px;
boostReplaceUserpicsShift: 24px;
boostReplaceUserpic: UserpicButton(defaultUserpicButton) {
	size: size(60px, 60px);
	photoSize: 60px;
}
boostReplaceIcon: icon{{ "stories/boost_mini", premiumButtonFg }};
boostReplaceIconSkip: 3px;
boostReplaceIconOutline: 2px;
boostReplaceIconAdd: point(4px, 2px);
boostReplaceArrow: icon{{ "mediaview/next", windowSubTextFg }};
boostReplaceUserpicsRow: UserpicsRow {
	button: boostReplaceUserpic;
	bg: windowBg;
	shift: boostReplaceUserpicsShift;
	stroke: boostReplaceIconOutline;
	complex: true;
}

showOrTitleIconMargin: 8px;
showOrTitlePadding: margins(0px, 0px, 0px, 5px);
showOrAboutPadding: margins(0px, 0px, 0px, 16px);
showOrShowButton: RoundButton(defaultActiveButton) {
	width: 308px;
	height: 42px;
	textTop: 12px;
	style: semiboldTextStyle;
}
showOrLabel: FlatLabel(boostText) {
	textFg: windowSubTextFg;
}
showOrLineWidth: 190px;
showOrLabelSkip: 7px;
showOrLineTop: 10px;
showOrLabelPadding: margins(0px, 17px, 0px, 13px);
showOrPremiumAboutPadding: margins(0px, 0px, 0px, 0px);
showOrBox: Box(boostBox) {
	buttonPadding: margins(28px, 16px, 28px, 27px);
	button: showOrShowButton;
}

boostBoxMaxHeight: 512px;
boostLevelBadge: FlatLabel(defaultFlatLabel) {
	margin: margins(12px, 4px, 12px, 5px);
	style: semiboldTextStyle;
	textFg: premiumButtonFg;
	align: align(top);
}
boostLevelBadgePadding: margins(30px, 12px, 32px, 12px);
boostLevelBadgeSkip: 12px;
boostLevelBadgeLine: 1px;

boostFeatureLabel: FlatLabel(defaultFlatLabel) {
	margin: margins(36px, 4px, 0px, 4px);
}
boostFeaturePadding: margins(64px, 6px, 24px, 6px);
boostFeatureIconPosition: point(0px, 0px);
boostFeatureBackground: icon{{ "settings/premium/features/feature_wallpaper", windowBgActive }};
boostFeatureCustomBackground: icon{{ "settings/premium/features/feature_custombg", windowBgActive }};
boostFeatureCustomEmoji: icon{{ "settings/premium/features/feature_emoji_pack", windowBgActive }};
boostFeatureCustomLink: icon{{ "settings/premium/features/feature_links2", windowBgActive }};
boostFeatureCustomReactions: icon{{ "settings/premium/features/feature_reactions", windowBgActive }};
boostFeatureEmojiStatus: icon{{ "settings/premium/features/feature_status", windowBgActive }};
boostFeatureLink: icon{{ "settings/premium/features/feature_links", windowBgActive }};
boostFeatureName: icon{{ "settings/premium/features/feature_color_names", windowBgActive }};
boostFeatureStories: icon{{ "settings/premium/features/feature_stories", windowBgActive }};
boostFeatureTranscribe: icon{{ "settings/premium/features/feature_voice", windowBgActive }};
boostFeatureAutoTranslate: icon{{ "menu/translate", windowBgActive }};
boostFeatureOffSponsored: icon{{ "settings/premium/features/feature_off_sponsored", windowBgActive }};
boostFeatureProfileColor: icon{{ "settings/premium/features/feature_color_profile", windowBgActive }};
boostFeatureProfileIcon: icon{{ "settings/premium/features/feature_profile_cover", windowBgActive }};

paidReactBox: Box(boostBox) {
	buttonPadding: margins(22px, 22px, 22px, 22px);
	button: RoundButton(defaultActiveButton) {
		height: 42px;
		textTop: 12px;
		style: semiboldTextStyle;
	}
}
paidReactBoxCheckbox: Checkbox(defaultCheckbox) {
	width: 0px;
}
darkEditStarsBox: Box(paidReactBox) {
	bg: groupCallMembersBg;
	title: FlatLabel(boxTitle) {
		textFg: groupCallMembersFg;
		align: align(top);
	}
}
paidReactBubbleIcon: icon{{ "settings/premium/star", premiumButtonFg }};
paidReactBubbleTop: 5px;
paidReactSliderTop: 5px;
paidReactSlider: MediaSlider(defaultContinuousSlider) {
	activeFg: windowBgOver;
	inactiveFg: windowBgOver;
	activeFgOver: windowBgOver;
	inactiveFgOver: windowBgOver;
	activeFgDisabled: windowBgOver;
	inactiveFgDisabled: windowBgOver;
	width: 16px;
	seekSize: size(16px, 16px);
	borderFg: creditsBg3;
	borderWidth: 2px;
}
darkEditStarsSlider: MediaSlider(paidReactSlider) {
	inactiveFg: groupCallMembersBgOver;
	inactiveFgOver: groupCallMembersBgOver;
	inactiveFgDisabled: groupCallMembersBgOver;
}
paidReactTitleSkip: 23px;
paidReactTopTitleMargin: margins(10px, 26px, 10px, 12px);
paidReactTopMargin: margins(0px, 12px, 0px, 11px);
paidReactTopUserpic: 42px;
paidReactTopNameSkip: 47px;
paidReactTopBadgeSkip: 32px;
paidReactCrown: icon{{ "calls/filled_stream_crown-24x24", premiumButtonFg }};
paidReactCrownTop: 7px;
paidReactCrownSkip: 12px;
paidReactCrownOutline: 1px;
paidReactCrownSmall: icon{{ "calls/filled_stream_crown-20x20", premiumButtonFg }};
paidReactCrownSmallTop: 4px;
paidReactCrownMargin: margins(0px, 0px, 0px, 0px);
paidReactToastLabel: FlatLabel(defaultFlatLabel) {
	textFg: toastFg;
	palette: defaultToastPalette;
}
paidReactTopStarIcon: icon{{ "chat/mini_stars", premiumButtonFg }};
paidReactTopStarIconPosition: point(0px, 1px);
paidReactTopStarSkip: 4px;
paidReactChannelArrow: icon{{ "intro_country_dropdown", activeButtonFg }};
paidReactChannelMenu: PopupMenu(popupMenuWithIcons) {
	menu: Menu(menuWithIcons) {
		widthMax: 240px;
	}
	maxHeight: 345px;
}

toastUndoStroke: 2px;
toastUndoSpace: 8px;
toastUndoDiameter: 20px;
toastUndoSkip: 20px;
toastUndoFont: font(12px bold);

starrefCover: PremiumCover(userPremiumCover) {
	bg: windowBgOver;
	starTopSkip: 24px;
	titlePadding: margins(0px, 12px, 0px, 11px);
}
starrefCoverHeight: 180px;
starrefFooterButton: RoundButton(defaultActiveButton) {
	height: 42px;
	textTop: 12px;
	style: semiboldTextStyle;
}
starrefFooterBox: Box(defaultBox) {
	buttonPadding: margins(22px, 11px, 22px, 54px);
	buttonHeight: 42px;
	buttonWide: true;
	button: starrefFooterButton;
	shadowIgnoreTopSkip: true;
}
starrefCopyButton: RoundButton(starrefFooterButton) {
	icon: icon {{ "info/edit/links_copy", activeButtonFg }};
	iconOver: icon {{ "info/edit/links_copy", activeButtonFgOver }};
	iconPosition: point(-1px, 5px);
}

starrefJoinIcon: icon{{ "payments/small_star", premiumButtonFg }};
starrefJoinUserpicsPadding: margins(0px, 32px, 0px, 10px);
starrefJoinTitlePadding: margins(0px, 0px, 0px, 12px);
starrefCenteredText: FlatLabel(defaultFlatLabel) {
	align: align(top);
	minWidth: 40px;
}
starrefJoinFooter: FlatLabel(starrefCenteredText) {
	textFg: windowSubTextFg;
}
starrefRevenueText: FlatLabel(starrefCenteredText) {
	palette: TextPalette(defaultTextPalette) {
		linkFg: creditsBg1;
	}
}

starrefInfoIconPosition: point(16px, 8px);
starrefBottomButton: RoundButton(defaultActiveButton) {
	height: 44px;
	textTop: 12px;
	style: semiboldTextStyle;
}
starrefButtonMargin: margins(12px, 6px, 12px, 4px);
starrefBottomButtonLabel: FlatLabel(defaultFlatLabel) {
	textFg: windowFgActive;
	style: semiboldTextStyle;
	minWidth: 0px;
}
starrefBottomButtonSublabel: FlatLabel(starrefBottomButtonLabel) {
	style: TextStyle(defaultTextStyle) {
		font: font(11px semibold);
	}
}
starrefBottomButtonLabelTop: 5px;
starrefBottomButtonSublabelTop: 23px;
starrefEndBulletSize: 6px;
starrefEndBulletTop: 8px;
starrefLinkThumbOuter: 64px;
starrefLinkThumbInner: 48px;
starrefLinkCountAdd: 6px;
starrefLinkCountIcon: icon{{ "chat/mini_subscribers", historyPeerUserpicFg }};
starrefLinkCountIconPosition: point(0px, 1px);
starrefLinkCountFont: font(10px bold);
starrefLinkCountPadding: margins(2px, 0px, 3px, 1px);
starrefRecipientBg: lightButtonBgOver;
starrefRecipientBgDisabled: windowBgOver;
starrefRecipientArrow: icon{{ "intro_country_dropdown", lightButtonFg }};
starrefCommissionFont: font(10px semibold);
starrefCommissionPadding: margins(3px, 0px, 3px, 0px);
starrefLinkBadge: 16px;
starrefLinkBadgeSkip: 1px;

starrefAddForBotIcon: icon {{ "menu/bot_add", lightButtonFg }};
starrefAddForBotIconPosition: point(23px, 2px);

starrefPopupMenu: PopupMenu(defaultPopupMenu) {
	maxHeight: 320px;
	menu: Menu(defaultMenu) {
		widthMin: 156px;
		widthMax: 200px;
	}
}

starSelectInfoPadding: margins(12px, 8px, 12px, 8px);
starSelectInfoTitle: FlatLabel(defaultFlatLabel) {
	minWidth: 40px;
	textFg: windowBoldFg;
	align: align(top);
	style: TextStyle(boxTextStyle) {
		font: font(18px semibold);
	}
}
starSelectInfoSubtext: FlatLabel(defaultFlatLabel) {
	minWidth: 40px;
	textFg: windowFg;
	align: align(top);
	style: TextStyle(defaultTextStyle) {
		font: font(10px);
	}
}
videoStreamInfoTitle: FlatLabel(starSelectInfoTitle) {
	textFg: groupCallMembersFg;
}
videoStreamInfoSubtext: FlatLabel(starSelectInfoSubtext) {
	textFg: groupCallMembersFg;
}
